Generates the parameters and signature for uploading a file to Object Storage Service (OSS).
Operation description
-
You can use the returned values to upload a file directly to Object Storage Service (OSS) by using a form.
-
For more information about form-based uploads, see OSS documentation.
-
Files uploaded to OSS are periodically deleted by the system.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hbr:CreateTempFileUploadUrl |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileName |
string |
Yes |
The name of the file to be uploaded. |
file-list.txt |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Endpoint |
string |
The OSS endpoint for the file upload. |
oss-cn-shenzhen.aliyuncs.com |
| RequestId |
string |
The request ID. |
F4EEB401-DD21-588D-AE3B-1E835C7655E1 |
| ExpireTime |
integer |
The expiration time of the upload signature, in UNIX timestamp format. Unit: seconds. |
1654326678 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Code |
string |
The HTTP status code. A value of 200 indicates success. |
200 |
| TempFileKey |
string |
The OSS object key for the file upload. |
temp/1440155109798732/upload/2022-07-29/49bed34c-b430-4e7e-89b1-4be2b734f95c/iaclone.diff |
| Message |
string |
The response message. "successful" is returned on success; otherwise, an error message is returned. |
successful |
| BucketName |
string |
The name of the destination OSS bucket. |
hbr-temp-bucket |
| OssAccessKeyId |
string |
The AccessKey ID for the OSS upload. |
LTAI****Up |
| Policy |
string |
The upload policy for the OSS form upload. |
eyJleH****V19 |
| Signature |
string |
The signature for the OSS form upload. |
RmhI****0A= |
Examples
Success response
JSON format
{
"Endpoint": "oss-cn-shenzhen.aliyuncs.com",
"RequestId": "F4EEB401-DD21-588D-AE3B-1E835C7655E1",
"ExpireTime": 1654326678,
"Success": true,
"Code": "200",
"TempFileKey": "temp/1440155109798732/upload/2022-07-29/49bed34c-b430-4e7e-89b1-4be2b734f95c/iaclone.diff",
"Message": "successful",
"BucketName": "hbr-temp-bucket",
"OssAccessKeyId": "LTAI****Up",
"Policy": "eyJleH****V19",
"Signature": "RmhI****0A="
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.