开发者社区 问答 正文

OSS 文件下载的文件名问题

文件路径为:bucket123.oss-cn-hangzhou.aliyuncs.com/34aa995eaa2646cd9d57dc29811d9c37.zip
上传文件的时候担心文件名一样导致文件覆盖,所以上传的时候文件名使用了 guid,下载的时候文件的名字是:34aa995eaa2646cd9d57dc29811d9c57.zip。
有什么方法可以让下载的时候文件的名字是当初上传的名字 或者 是自己定义的名字。

展开
收起
yanzhen 2015-11-18 09:52:27 12662 分享 版权
2 条回答
写回答
取消 提交回答
  • 比如:Content-Disposition:attachment;filename="FileName.zip"
    2015-11-18 13:50:41
    赞同 展开评论
  • 上传的时候指定Content-Disposition: attachment=xxxxx为http的header头。
    2015-11-18 10:24:35
    赞同 展开评论