|
@@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.io.File;
|
|
|
+import java.net.URL;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
/**
|
|
@@ -272,7 +273,6 @@ public class SceneController extends BaseController {
|
|
|
|
|
|
fYunFileServiceInterface.uploadFile(filePath,filePath.replace(ConstantFilePath.MANAGE_PATH,"ucenter/"));
|
|
|
|
|
|
-
|
|
|
UploadEditSceneParam editSceneParam = new UploadEditSceneParam();
|
|
|
editSceneParam.setTitle(title);
|
|
|
editSceneParam.setUserId(getUser().getId());
|
|
@@ -302,5 +302,16 @@ public class SceneController extends BaseController {
|
|
|
|
|
|
return Result.success();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/getUploadUrl")
|
|
|
+ public Result getUploadUrl( @RequestParam(value = "fileName",required = false)String fileName) {
|
|
|
+ String newFileName = UUID.randomUUID().toString().replace("-","");
|
|
|
+ String suffix = fileName.substring(fileName.lastIndexOf("."));
|
|
|
+
|
|
|
+ URL presignedUrl = fYunFileServiceInterface.getPresignedUrl("ucenter/e57/" + newFileName + suffix);
|
|
|
+
|
|
|
+ return Result.success(presignedUrl.getRef());
|
|
|
+ }
|
|
|
}
|
|
|
|