【问题标题】:Downloading Azure blob using shared access signature fails with curl or httr使用共享访问签名下载 Azure blob 失败并出现 curl 或 httr
【发布时间】:2018-05-21 04:30:12
【问题描述】:

在使用 curl::curl_downloadhttr::GET 之前,我已经设法从 blob 存储下载,但这次失败并出现 400 错误。但是,如果我使用 base R 的 download.file,它可以工作。

下载网址是(逐字复制,但省略了文件详细信息和实际签名):

https://{account}.blob.core.windows.net/{store}/{file.zip}?sp=r&st=2018-05-19T00:00:00Z&se=2018-05-31T00:00:00Z&spr=https&sv=2017-07-29&sig={...}&sr=b

其中 SAS 部分是

sp=r&st=2018-05-19T00:00:00Z&se=2018-05-31T00:00:00Z&spr=https&sv=2017-07-29&sig={...}&sr=b

还有其他人遇到过这个问题吗?

【问题讨论】:

    标签: r curl azure-blob-storage rcurl httr


    【解决方案1】:

    事实证明,这与 SAS 无关。文件名中有一个空格,Windows 上默认的download.file 变成了%20,但 curl 没有。手动将空间编码为%20 解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2016-08-23
      • 1970-01-01
      • 1970-01-01
      • 2022-10-21
      • 1970-01-01
      • 2018-09-02
      • 2013-12-31
      • 2017-08-24
      • 2019-10-10
      相关资源
      最近更新 更多