|
@@ -82,7 +82,8 @@ public class SceneFileController{
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
@PostMapping("getS3UploadUrl")
|
|
@PostMapping("getS3UploadUrl")
|
|
- public Result getS3UploadUrl(String params) throws Exception {
|
|
|
|
|
|
+ public ResultData getS3UploadUrl(String params) throws Exception {
|
|
|
|
+ log.info("getS3UploadUrl 参数:{}",params);
|
|
if (StringUtils.isEmpty(params)) {
|
|
if (StringUtils.isEmpty(params)) {
|
|
throw new BusinessException(ErrorCode.PARAM_ERROR,"params为空。");
|
|
throw new BusinessException(ErrorCode.PARAM_ERROR,"params为空。");
|
|
}
|
|
}
|
|
@@ -94,13 +95,12 @@ public class SceneFileController{
|
|
if(files == null){
|
|
if(files == null){
|
|
throw new BusinessException(ErrorCode.PARAM_ERROR,"params为空。");
|
|
throw new BusinessException(ErrorCode.PARAM_ERROR,"params为空。");
|
|
}
|
|
}
|
|
- //生成预签名URL
|
|
|
|
- log.info("生成预签名URL");
|
|
|
|
List<String> urls = new ArrayList<>();
|
|
List<String> urls = new ArrayList<>();
|
|
for(int i = 0, len = files.size(); i < len; i++){
|
|
for(int i = 0, len = files.size(); i < len; i++){
|
|
urls.add(files.getJSONObject(i).getString("filename"));
|
|
urls.add(files.getJSONObject(i).getString("filename"));
|
|
}
|
|
}
|
|
- return Result.success(getUploadS3Url(urls));
|
|
|
|
|
|
+ Map<String, String> uploadS3Url = getUploadS3Url(urls);
|
|
|
|
+ return ResultData.ok(uploadS3Url);
|
|
}
|
|
}
|
|
|
|
|
|
private Map<String, String> getUploadS3Url(List<String> urls) {
|
|
private Map<String, String> getUploadS3Url(List<String> urls) {
|