吉安感知网项目-后端
linwei
2026-06-04 ad935c07a6cabf05fed9c615c7bd4f67f6d65293
drone-ops/drone-resource/src/main/java/org/sxkj/resource/endpoint/OssEndpoint.java
@@ -188,7 +188,7 @@
    @PostMapping("/put-file-attach-by-name")
    @ApiOperation(value = "上传文件并保存至附件表", notes = "上传文件并保存至附件表-存储桶对象名称")
    public R<BladeFile> putFileAttach(@RequestParam String fileName,
                                      @RequestParam Integer resultType,
                                      @RequestParam String resultType,
                                      @RequestParam MultipartFile file) {
        BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream());
        Long attachId = buildAttach(fileName, resultType, file.getSize(), bladeFile);
@@ -224,7 +224,7 @@
    private BladeFile getBladeFile(@RequestParam MultipartFile file) throws IOException {
        String fileName = file.getOriginalFilename();
        BladeFile bladeFile = ossBuilder.template("estack").putFile(fileName, file.getInputStream());
        Long attachId = buildAttach(fileName, null, file.getSize(), bladeFile);
        Long attachId = buildAttach(fileName, "", file.getSize(), bladeFile);
        bladeFile.setAttachId(attachId);
        return bladeFile;
    }
@@ -237,7 +237,7 @@
     * @param bladeFile 对象存储文件
     * @return attachId
     */
    private Long buildAttach(String fileName, Integer resultType, Long fileSize, BladeFile bladeFile) {
    private Long buildAttach(String fileName, String resultType, Long fileSize, BladeFile bladeFile) {
        String fileExtension = FileUtil.getFileExtension(fileName);
        Attach attach = new Attach();
        attach.setDomainUrl(bladeFile.getDomain());