Azure Blob upload的一个任意上传
step1:获取操作blob的link
GET /your_path/uploaduri?filename=wulala.exe HTTP/2
Host:127.0.0.1
Sec-Ch-Ua:"Not/A)Brand";v="99","Google Chrome";v="115","Chromium";v="115"
X-Gsuite-Timezone:-480
Sec-Ch-Ua-Mobile:?0
Authorization: JWT
User-Agent:Mozilla/5.0(Windows NT 10.0;Win64; x64)AppleWebKit/537.36(KHTML, like Gecko)Chrome/115.0.0.0Safari/537.36
Content-Type: application/json
X-Gsuite-Language: zh
X-Gsuite-Enduser:true
Sec-Ch-Ua-Platform:"Windows"
Accept:*/*
Origin: https://127.0.0.1
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://127.0.0.1/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
step2:upload,这里没什么说的
step3:send,
修复的话,参考Microsoft的官方文档就行了。
https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas
User delegation SAS support for directory-scoped access
A user delegation SAS supports directory scope (sr=d
) when the authorization version (sv
) is 2020-02-10 or later and a hierarchical namespace (HNS) is enabled. The semantics for directory scope (sr=d
) are similar to container scope (sr=c
), except that access is restricted to a directory and any files and subdirectories within it. When sr=d
is specified, the sdd
query parameter is also required.
The string-to-sign format for authorization version 2020-02-10 is unchanged.
Specify query parameters to override response headers
To define values for certain response headers to be returned when the shared access signature is used in a request, you can specify response headers in query parameters. The response headers and corresponding query parameters are as follows:
Response header name | Corresponding SAS query parameter |
Cache-Control |
rscc |
Content-Disposition |
rscd |
Content-Encoding |
rsce |
Content-Language |
rscl |
Content-Type |
rsct |
For example, if you specify the rsct=binary
query parameter on a SAS token, the Content-Type
response header is set to binary
. This value overrides the Content-Type
header value stored for the blob for a request using this shared access signature only.
If you create a shared access signature that specifies response headers as query parameters, you must include those response headers in the string-to-sign that's used to construct the signature string. For more information, see the "Specify the signature" section.
原文始发于微信公众号(wulala520):Azure Blob upload的一个任意上传
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论