Skip to content

Commit 404b859

Browse files
swagger added
1 parent a69ee26 commit 404b859

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/uz/javadev/controller/FileController.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,22 @@ public CommonResultData<FileDto> uploadFile(@RequestParam(name = "file")
3535
return service.uploadFile(file, bucketName);
3636
}
3737

38+
@Operation(summary = "Download file", description = "This api for download files")
3839
@GetMapping("/download/{id}")
3940
public CommonResultData<String> downloadFile(@PathVariable UUID id,
4041
HttpServletResponse response) {
4142
log.info("REQUEST download file with id {}", id);
4243
return service.downloadFile(id, response);
4344
}
4445

46+
@Operation(summary = "Preview image", description = "This Api for preview image only images")
4547
@GetMapping("/preview/{fileId}")
4648
public void previewPhoto(@PathVariable UUID fileId, HttpServletResponse response) {
4749
log.info("REQUEST preview file with id {}", fileId);
4850
service.preview(fileId, response);
4951
}
5052

53+
@Operation(summary = "Delete file",description = "This api for delete files")
5154
@DeleteMapping("/delete/{id}")
5255
public CommonResultData<String> deleteFile(@PathVariable UUID id) {
5356
log.info("REQUEST delete file with id {}", id);

0 commit comments

Comments
 (0)