对象存储服务 OBS-PUT上传:请求示例:上传时配置website实现下载对象重定向

时间:2024-10-21 15:06:42

请求示例:上传时配置website实现下载对象重定向

当桶设置了Website配置,您可以在上传对象时进行以下设置,设置后用户在下载对象时会重定向

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
PUT /object01 HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.cn-north-4.myhuaweicloud.com
Accept: */*
Date: WED, 01 Jul 2015 04:17:12 GMT
x-obs-website-redirect-location: http://www.example.com/
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:uFVJhp/dJqj/CJIVLrSZ0gpw3ng=
Content-Length: 10240
Expect: 100-continue

[1024 Byte data content]
support.huaweicloud.com/api-obs/obs_04_0080.html