업로드 관련 수정

This commit is contained in:
Moon
2026-01-08 18:43:40 +09:00
parent 0a311b09a8
commit ecf9b8a24f
15 changed files with 185 additions and 239 deletions

View File

@@ -81,13 +81,13 @@ public class UploadApiController {
})
@PostMapping(value = "/file-chunk-upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ApiResponseDto<UploadDto.UploadRes> fileChunkUpload(
@RequestParam("uuid") UUID uuid,
@RequestParam("fileName") String fileName,
@RequestParam("fileSize") long fileSize,
// @RequestParam("fileHash") String fileHash,
@RequestParam("chunkIndex") Integer chunkIndex,
@RequestParam("chunkTotalIndex") Integer chunkTotalIndex,
@RequestPart("chunkFile") MultipartFile chunkFile) {
@RequestParam("uuid") UUID uuid,
@RequestParam("fileName") String fileName,
@RequestParam("fileSize") long fileSize,
// @RequestParam("fileHash") String fileHash,
@RequestParam("chunkIndex") Integer chunkIndex,
@RequestParam("chunkTotalIndex") Integer chunkTotalIndex,
@RequestPart("chunkFile") MultipartFile chunkFile) {
String uploadDivi = "dataset";
@@ -102,7 +102,7 @@ public class UploadApiController {
upAddReqDto.setFinalPath(datasetDir);
upAddReqDto.setTempPath(datasetTmpDir);
System.out.println("uuid === "+ uuid);
System.out.println("uuid === " + uuid);
return ApiResponseDto.ok(uploadService.uploadChunk(upAddReqDto, chunkFile));
}
@@ -116,8 +116,7 @@ public class UploadApiController {
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
@PutMapping("/chunk-upload-complete/{uuid}")
public ApiResponseDto<UploadDto.UploadRes> completeUpload(
@PathVariable UUID uuid) {
public ApiResponseDto<UploadDto.UploadRes> completeUpload(@PathVariable UUID uuid) {
return ApiResponseDto.ok(uploadService.completeUpload(uuid));
}