5
我想知道是否可以从Google云端存储中下载文件的名称与存储区中名称不同。Google云端存储:下载不同名称的文件
例如,在谷歌云存储我已经存储了一个名为123-file.txt
文件,但是当我下载它,我想选择一个不同的名字,让我们说file.txt
我已经注意到,链接,下载它像: https://storage.cloud.google.com/bucket_name%2F123-file.txt?response-content-disposition=attachment;%20filename=123-file.txt
但它仍然继续下载123-file.txt的,而不是file.txt的
签名的网址为我工作。虽然,我试着用参数response_headers和值response-content-disposition调用generate_url(),但我得到了畸形签名的url。所以我的解决方案是将'&response-content-disposition = attachment%3B%20filename%3D“{}”'。format(file_name)连接到签名的url并且它工作。 – dablak
记录response-content-disposition查询参数在哪里?其他有效的查询参数是什么? –
有效的XML API参数的完整列表位于https://cloud.google.com/storage/docs/reference-headers –