请教 springboot 对接 Azure 上传文件问题

14次阅读

共计 418 个字符,预计需要花费 2 分钟才能阅读完成。

我有个对接 Azure 的问题想请教一下。我在 maven 里引了 azure-storage-blob,也拿到了 sasToken,构建 blobClient 调用 isExists 和 downloadToFile 都没问题。
但是调用 upload 上传文件就一直报错,错误是

Caused by: com.azure.storage.blob.models.BlobStorageException: Status code 400, “InvalidHeaderValueThe value for one of the HTTP headers is not in the correct format.
RequestId:89202da3-801a-000d-5cce-b3b7f3000000
Time:2024-06-01T02:48:29.2368676Z
Content-Length24

很奇怪,但是我如果不用 sdk,直接用 Azcopy 是可以上传成功的。不知道各位有没有遇见过类似问题

正文完
 0