Commit c33ac5ae by gdj

pushFileUpload调整上传机场无人机日志文件在oss的目录

parent 6eb9aaf2
......@@ -49,6 +49,9 @@ import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
import static com.dji.sample.common.util.SecurityUtils.getOrgId;
import static com.dji.sample.common.util.SecurityUtils.getWorkspaceId;
/**
* @author sean
* @version 1.2
......@@ -152,7 +155,7 @@ public class DeviceLogsServiceImpl extends AbstractLogService implements IDevice
LogsUploadCredentialsDTO credentialsDTO = new LogsUploadCredentialsDTO(stsCredentials);
// Set the storage name of the file.
List<FileUploadStartFile> files = param.getFiles();
files.forEach(file -> file.setObjectKey(credentialsDTO.getObjectKeyPrefix() + "/" + UUID.randomUUID().toString() + LOGS_FILE_SUFFIX));
files.forEach(file -> file.setObjectKey(credentialsDTO.getObjectKeyPrefix() + "/" + getWorkspaceId() + "/" + getOrgId() + "/" + "logs" + "/" + UUID.randomUUID().toString() + LOGS_FILE_SUFFIX));
credentialsDTO.setParams(new FileUploadStartParam().setFiles(files));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment