package Ġmag ics quare . quart um backend . web . controllers Ċ Ċ import Ġmag ics quare . quart um backend . services . Article P ictures Doc Service Ċ import Ġmag ics quare . quart um backend . web . dto . Document Dto Ċ import Ġorg . springframework . web . bind . annotation .* Ċ import Ġorg . springframework . web . multipart . Multipart File Ċ Ċ @ Cross Origin ( max Age Ġ= Ġ 3 6 0 0 ) Ċ @ RequestMapping ("/ api / media ") Ċ @ RestController Ċ class ĠMedia Controller ( ĊĠĠĠ Ġprivate Ġval Ġpictures Doc Service : ĠArticle P ictures Doc Service Ċ ) Ġ{ ĊĊĠĠĠ Ġ@ PostMapping ( value Ġ= [" / upload / profile Photo "], Ġconsume s Ġ= Ġ[" multipart / form - data "]) ĊĠĠĠ Ġfun Ġupload Photo ( Ġfile : ĠMultip art File ) Ġ{ ĊĠĠĠĠĠĠĠ Ġpictures Doc Service . save ( file ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ GetMapping ("/ get Profile Photo ") ĊĠĠĠ Ġfun Ġget Profile Photo (){ ĊĠĠĠĠĠĠĠ Ġreturn Ġpictures Doc Service . get Profile Photo ById () ĊĠĠĠ Ġ} Ċ } Ċ