package Ġio . must el id ae . sea ot ter . api . controller Ċ Ċ import Ġio . must el id ae . sea ot ter . api . resources . Editing Step Value Deserializer Ċ import Ġio . must el id ae . sea ot ter . api . resources . Editing Upload Resources Ċ import Ġio . must el id ae . sea ot ter . common . Rep lies Ċ import Ġio . must el id ae . sea ot ter . domain . delivery . Edit Image Delivery Ċ import Ġio . must el id ae . sea ot ter . domain . delivery . Image Ċ import Ġio . must el id ae . sea ot ter . domain . editor . processor . Edit Operation Ċ import Ġio . must el id ae . sea ot ter . utils . to Rep lies Ċ import Ġio . swagger . annotations . Api Ċ import Ġio . swagger . annotations . Api Implicit Param Ċ import Ġio . swagger . annotations . Api Implicit Params Ċ import Ġio . swagger . annotations . ApiOperation Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . http . MediaType Ċ import Ġorg . springframework . util . Base 6 4 Utils Ċ import Ġorg . springframework . web . bind . annotation . PostMapping Ċ import Ġorg . springframework . web . bind . annotation . RequestBody Ċ import Ġorg . springframework . web . bind . annotation . RequestMapping Ċ import Ġorg . springframework . web . bind . annotation . RequestParam Ċ import Ġorg . springframework . web . bind . annotation . Request Part Ċ import Ġorg . springframework . web . bind . annotation . RestController Ċ import Ġorg . springframework . web . multipart . Multipart File Ċ Ċ @ Api ( tags Ġ= Ġ[" Editing ĠImage ĠUpload "]) Ċ @ RestController Ċ @ RequestMapping ("/ upload / editing ") Ċ class ĠEdit ing Image Upload Controller Ċ @ Autowired Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġedit Image Delivery : ĠEdit Image Delivery Ċ ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġediting Step Value Deserializer Ġ= ĠEdit ing Step Value Deserializer () ĊĊĠĠĠ Ġ@ ApiOperation (" upload Ġby Ġmultipart ") ĊĠĠĠ Ġ@ Api Implicit Params ( ĊĠĠĠĠĠĠĠ Ġvalue Ġ= Ġ[ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠApi Implicit Param ( param Type Ġ= Ġ" query ", Ġname Ġ= Ġ" 1 : crop "), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠApi Implicit Param ( param Type Ġ= Ġ" query ", Ġname Ġ= Ġ" 1 : resize "), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠApi Implicit Param ( param Type Ġ= Ġ" query ", Ġname Ġ= Ġ" 1 : rotate ") ĊĠĠĠĠĠĠĠ Ġ] ĊĠĠĠ Ġ) ĊĠĠĠ Ġ@ PostMapping ( ĊĠĠĠĠĠĠĠ Ġ" multipart ", ĊĠĠĠĠĠĠĠ Ġconsume s Ġ= Ġ[ MediaType . MULTI PART _ FORM _ DATA _ VALUE ], ĊĠĠĠĠĠĠĠ Ġproduces Ġ= Ġ[ MediaType . APPLICATION _ JSON _ VALUE ] ĊĠĠĠ Ġ) ĊĠĠĠ Ġfun Ġupload ( ĊĠĠĠĠĠĠĠ Ġ@ Request Part ( required Ġ= Ġtrue ) Ġmulti Part File : ĠMultip art File , ĊĠĠĠĠĠĠĠ Ġ@ RequestParam Ġall Params : ĠMap < String , ĠString >, ĊĠĠĠĠĠĠĠ Ġ@ RequestParam ( required Ġ= Ġfalse ) Ġhas Original : ĠBoolean ?, ĊĠĠĠĠĠĠĠ Ġ@ RequestParam ( required Ġ= Ġfalse ) Ġtopic : ĠString ? ĊĠĠĠ Ġ): ĠRep lies < Editing Upload Resources . Reply On Image > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġoperations Ġ= Ġediting Step Value Deserializer . deserialize ( all Params ) ĊĠĠĠĠĠĠĠ Ġval Ġedit Operation Ġ= ĠEdit Operation . from ( operations ) ĊĠĠĠĠĠĠĠ Ġval Ġimage Ġ= ĠImage . from ( multi Part File ). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrandomize Name () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġshipping Item Ġ= Ġedit Image Delivery . delivery ( image , Ġhas Original Ġ?: Ġfalse , Ġedit Operation ) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġshipping Item . sh ipped Images ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠEdit ing Upload Resources . Reply On Image . from ( it , Ġedit Operation . hist ories ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. to Rep lies () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ ApiOperation (" upload Ġby Ġbase 6 4 ") ĊĠĠĠ Ġ@ Api Implicit Params ( ĊĠĠĠĠĠĠĠ Ġvalue Ġ= Ġ[ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠApi Implicit Param ( param Type Ġ= Ġ" query ", Ġname Ġ= Ġ" 1 : crop "), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠApi Implicit Param ( param Type Ġ= Ġ" query ", Ġname Ġ= Ġ" 1 : resize "), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠApi Implicit Param ( param Type Ġ= Ġ" query ", Ġname Ġ= Ġ" 1 : rotate ") ĊĠĠĠĠĠĠĠ Ġ] ĊĠĠĠ Ġ) ĊĠĠĠ Ġ@ PostMapping ( ĊĠĠĠĠĠĠĠ Ġ" base 6 4 / form ", ĊĠĠĠĠĠĠĠ Ġconsume s Ġ= Ġ[ MediaType . APPLICATION _ FORM _ URL ENCODE D _ VALUE ], ĊĠĠĠĠĠĠĠ Ġproduces Ġ= Ġ[ MediaType . APPLICATION _ JSON _ VALUE ] ĊĠĠĠ Ġ) ĊĠĠĠ Ġfun Ġupload ( ĊĠĠĠĠĠĠĠ Ġ@ RequestParam Ġbase 6 4 : ĠString , ĊĠĠĠĠĠĠĠ Ġ@ RequestParam Ġall Params : ĠMap < String , ĠString >, ĊĠĠĠĠĠĠĠ Ġ@ RequestParam ( required Ġ= Ġfalse ) Ġhas Original : ĠBoolean ?, ĊĠĠĠĠĠĠĠ Ġ@ RequestParam ( required Ġ= Ġfalse ) Ġtopic : ĠString ? ĊĠĠĠ Ġ): ĠRep lies < Editing Upload Resources . Reply On Image > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġoperations Ġ= Ġediting Step Value Deserializer . deserialize ( all Params ) ĊĠĠĠĠĠĠĠ Ġval Ġedit Operation Ġ= ĠEdit Operation . from ( operations ) ĊĠĠĠĠĠĠĠ Ġval Ġimage Ġ= ĠImage . from ( base 6 4 ) ĊĊĠĠĠĠĠĠĠ Ġval Ġshipping Item Ġ= Ġedit Image Delivery . delivery ( image , Ġhas Original Ġ?: Ġfalse , Ġedit Operation ) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġshipping Item . sh ipped Images ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠEdit ing Upload Resources . Reply On Image . from ( it , Ġedit Operation . hist ories ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. to Rep lies () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ ApiOperation (" upload Ġby Ġsafe Ġurl Ġbase 6 4 Ġusing Ġjson ") ĊĠĠĠ Ġ@ PostMapping ( ĊĠĠĠĠĠĠĠ Ġ" base 6 4 / json ", ĊĠĠĠĠĠĠĠ Ġconsume s Ġ= Ġ[ MediaType . APPLICATION _ JSON _ VALUE ], ĊĠĠĠĠĠĠĠ Ġproduces Ġ= Ġ[ MediaType . APPLICATION _ JSON _ VALUE ] ĊĠĠĠ Ġ) ĊĠĠĠ Ġfun Ġupload ( ĊĠĠĠĠĠĠĠ Ġ@ RequestBody Ġrequest : ĠEdit ing Upload Resources . Request , ĊĠĠĠĠĠĠĠ Ġ@ RequestParam ( required Ġ= Ġfalse ) Ġtopic : ĠString ? ĊĠĠĠ Ġ): ĠRep lies < Editing Upload Resources . Reply On Image > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbase 6 4 Ġ= ĠString ( Base 6 4 Utils . decode From Url Safe String ( request . base 6 4 )) ĊĠĠĠĠĠĠĠ Ġval Ġedit Operation Ġ= ĠEdit Operation . from ( request . ed its ) ĊĠĠĠĠĠĠĠ Ġval Ġimage Ġ= ĠImage . from ( base 6 4 ) ĊĊĠĠĠĠĠĠĠ Ġval Ġshipping Item Ġ= Ġedit Image Delivery . delivery ( image , Ġrequest . has Original Ġ?: Ġfalse , Ġedit Operation ) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġshipping Item . sh ipped Images ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠEdit ing Upload Resources . Reply On Image . from ( it , Ġedit Operation . hist ories ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. to Rep lies () ĊĠĠĠ Ġ} Ċ } Ċ