rain
2024-08-15 2927bb498574a0e30bcbb3a9f7ee9468636cf0d8
src/main/java/com/dji/sample/media/service/impl/FileServiceImpl.java
@@ -120,12 +120,15 @@
    public Integer saveFile(String workspaceId, FileUploadDTO file) throws ImageProcessingException, IOException {
        MediaFileEntity fileEntity = this.fileUploadConvertToEntity(file);
        fileEntity.setWorkspaceId(workspaceId);
        fileEntity.setIsadd(0);
        fileEntity.setFileId(UUID.randomUUID().toString());
        if (file.getObjectKey().endsWith("jpeg")){
            fileEntity.setIsadd(0);
        String url = pojo.getEndpoint() + "/" + pojo.getBucket() + file.getObjectKey();
        File downloadedFile = TbFjServiceImpl.downloadFile(url);
        Object data = ImgUtil.getInfo(downloadedFile);
        fileEntity.setDroneData(data);
            updateStatue(file.getName());
        }
        return mapper.insert(fileEntity);
    }
    public void saveFiles(String workspaceId, FileUploadDTO file) {