Return fileService saveFile(id,file)


Download 14.17 Kb.
Sana17.09.2022
Hajmi14.17 Kb.
#810146
Bog'liq
14-seminar 15-seminar
14-15. Amaliy dars (1), МТТларда ЖШ олиб бориш тартиби - копия, Untitled.FR11, 2 a3 G\'ayratov Jahon Lee (Автосохраненный), 10-11-SINF CHQBT, 1.3.1. Muzeylarning ilmiy-tadqiqotchilik faoliyati., Сырты, hr2HhmnTa9VbTAggF4N0mOL00piR4ieHBr5vGdKA (1), 10-sinf olimpiada savollari, Darajalarga bo, Protokol, Психология, 823 BO\'YICHA SO\'ROVNOMA (3), macdonald

@PostMapping("/newFile/{id}")
public UUID saveFile(@PathVariable UUID id,@RequestParam MultipartFile file){
return fileService.saveFile(id,file);
}

@SneakyThrows
public UUID saveFile(UUID id,MultipartFile file) {
Attachment attachment =new Attachment(id,file.getBytes());
WhyUS whyUS = whyUsRepo.findById(id).get();
whyUS.setAttachment(attachment);
return whyUS.getId();
}
Download 14.17 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2023
ma'muriyatiga murojaat qiling