rain
2024-05-30 c00662a72ca1582c064a2bd76aa92fd22fbfedc6
src/main/java/com/dji/sample/media/controller/MediaController.java
@@ -35,6 +35,7 @@
    /**
     * Check if the file has been uploaded by the fingerprint.
     * 检查文件是否已通过指纹上传。
     *
     * @param workspaceId
     * @param file
     * @return
@@ -50,6 +51,7 @@
    /**
     * When the file is uploaded to the storage server by pilot,
     * the basic information of the file is reported through this interface.
     *
     * @param workspaceId
     * @param file
     * @return
@@ -57,12 +59,12 @@
    @PostMapping("/{workspace_id}/upload-callback")
    public ResponseResult<String> uploadCallback(@PathVariable(name = "workspace_id") String workspaceId, @RequestBody FileUploadDTO file) throws IOException, FontFormatException {
        mediaService.saveMediaFile(workspaceId, file);
        mediaService.saveMediaMarkFile(workspaceId, file);
        return ResponseResult.success(file.getObjectKey());
    }
    /**
     * Query the files that already exist in this workspace based on the workspace id and the collection of tiny fingerprints.
     *
     * @param workspaceId
     * @param tinyFingerprints  There is only one tiny_fingerprint parameter in the body.
     *                          But it is not recommended to use Map to receive the parameter.
@@ -79,7 +81,7 @@
    @GetMapping("/{workspace_id}/files/media_page")
    public ResponseResult<PaginationData<MediaJobDTO>> mediaPage(
            @PathVariable(name = "workspace_id") String workspaceId, @RequestBody SearchMediaParam param)   {
            @PathVariable(name = "workspace_id") String workspaceId, @RequestBody SearchMediaParam param) {
        PaginationData<MediaJobDTO> data = mediaService.mediaPage(workspaceId, param);
        return ResponseResult.success(data);