三阶段上传,第二阶段返回的上传地址是个接口,该接口接收到文件流保存到本地文件乱码

阅读次数 1

image.png

方法签名, byte[] content为接收到的文件流 public void getFile(byte[] content, String fileName, String fileId) { String dir = Constant.TEMP_FILE_PATH + jsonStoreService.generatorStoreId() + "/"; FileUtil.mkdir(dir);
File docFile = new File(dir + fileName + ".doc");
FileUtil.writeBytes(content, docFile);
}

1 Answers

看起来像文档格式搞错了,确定是doc文档吗?

您好,我们的文档是 docx 的,这个是第一版的文档路径https://res.dafenqi.law/work-wechat-prod/vinci-contract-system/20240613/a594ca791db840f881cebb0e6fcca072.docx