|
|
|
@ -1,5 +1,8 @@
|
|
|
|
package kr.re.etri.autoflow.controllers;
|
|
|
|
package kr.re.etri.autoflow.controllers;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
|
|
|
import kr.re.etri.autoflow.entity.MinioAttachmentEntity;
|
|
|
|
import kr.re.etri.autoflow.entity.MinioAttachmentEntity;
|
|
|
|
import kr.re.etri.autoflow.payload.request.ProjectBaseSearchRequest;
|
|
|
|
import kr.re.etri.autoflow.payload.request.ProjectBaseSearchRequest;
|
|
|
|
import kr.re.etri.autoflow.service.DynamicMinioAttachmentService;
|
|
|
|
import kr.re.etri.autoflow.service.DynamicMinioAttachmentService;
|
|
|
|
@ -85,9 +88,22 @@ public class DynamicMinioAttachmentController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/download-to-server")
|
|
|
|
@PostMapping("/download-to-server")
|
|
|
|
|
|
|
|
@Operation(
|
|
|
|
|
|
|
|
summary = "MinIO 객체 서버 다운로드",
|
|
|
|
|
|
|
|
description = "MinIO에 저장된 객체를 서버의 지정된 경로로 다운로드합니다.",
|
|
|
|
|
|
|
|
responses = {
|
|
|
|
|
|
|
|
@ApiResponse(responseCode = "200", description = "파일 다운로드 성공"),
|
|
|
|
|
|
|
|
@ApiResponse(responseCode = "500", description = "파일 다운로드 실패")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
public String downloadFileToServer(
|
|
|
|
public String downloadFileToServer(
|
|
|
|
|
|
|
|
@Parameter(description = "다운로드할 MinIO 객체 이름", example="4/9d08fa7973cf4c39a0979bb4d70c640b/artifacts/sklearn-model/model.pkl", required = true)
|
|
|
|
@RequestParam String objectName,
|
|
|
|
@RequestParam String objectName,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Parameter(description = "MINIO 서버 타입 (type1[kubeflow],type2[mlflow])",example="type2", required = true)
|
|
|
|
@RequestParam String type,
|
|
|
|
@RequestParam String type,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Parameter(description = "서버에 저장할 로컬 경로", example="downloads/temp", required = false)
|
|
|
|
@RequestParam String localPath
|
|
|
|
@RequestParam String localPath
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|