Upload Files to Public Storage
Obtain the file(s) upload URL and upload the file(s) to public storage first before confirming the file upload and adding resources to the system.
Request URL
POST {base_url}/uc-resources/api/v1/system/file
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description bizType Yes String The business type of the files to upload. Valid value:
auto_phoneAI_KNOWLEDGE_BASEBRANDING
isPublic Yes Boolean Whether the uploaded files are publicly accessible. Valid value:
truefalse
files Yes Array<File_Item> The list of files to upload. appCode No String The application code. Valid value:platform: The file will be uploaded to the public storage for platform resource. (Default)tenant: The file will be uploadedd to the public storage for tenant resource.web: The file will be uploaded to the public storage for branding resource.
expiresInSeconds No Integer The validity period of the returned file upload URL, in seconds. Note:- The maximum value is 604800.
- If this parameter is not specified, the default value 900 is used.
subPath No String The custom sub path of the file to upload. ttl No Integer The resource Time To Live (TTL) in seconds, between upload completion and storage confirmation. Note:- An integer from 1 to 2147483647 is allowed.
- If this parameter is not specified, the resource never expires.
pathMode No String The path mode for public resources.
Valid value:
ORIGINAL_PATH
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<File_Upload_Credentials> | The file upload credentials. |
- File_Upload_Credentials
-
Parameter Type Description items Array<Credential_Item> The list of file upload credentials.
Example
Request example
POST /uc-resources/api/v1/system/file HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MTkxMDc4NCwiaWF0IjoxNzkxODg5MTg0LCJqdGkiOiI0MzFjYWQ3OC0wMjhlLTQ3OGEtYTBjOC1iOGVkMjg3OWM3Y2EiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.4FJJ47AWqWlT6aF1vACc9iQwKWPemqe7C-VnYTEizL-2umZPs8ThDmsL7H74Cp2HK7JiUU01NepbR26dT-IHsIUaQzPjlpRQqycXI0Na3KIDzJ2bxa4ieosc621khHvy9jSyfJ8L7bcVHdW0Wmafq18L7lyTojfurarraRWoApOhBkcEk_txXZBb5yXDjAwbtwEFagHFZauehP6bMQpVc0vbgedIdlrNKhtxmIw_B522csBI9z6Ax_1uhRW__G8zuFP0lsBhga-SJmqdXOCU1pdZ6CeU6_VINujpn_WGHPTTNrTX1JK4wnP-oUVmPjCPNbyg9V4Wp2c11ahSHbq_Xw
Content-Type: application/json
x-tenant-code: jint
{
"bizType":"auto_phone",
"isPublic":true,
"appCode":"platform",
"files":[
{
"fileName":"Wallpaper.png",
"contentType":"image/png"
}
]
}
Response example
HTTP/1.1 200 OK { "result": { "items": [ { "resourceId": "2116051080461225986", "fileName": "Wallpaper.png", "uploadUrl": "https://novo-one-tst-self-operated-business.s3.ap-east-1.amazonaws.com/public/platform/3076913644890832896/auto_phone/Wallpaper.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20261030T061426Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Credential=AKIA6ODU5BKBMSDIXP4N%2F20261030%2Fap-east-1%2Fs3%2Faws4_request&X-Amz-Expires=900&X-Amz-Signature=ef27d5b419636f12772f85c18d35910de781644ff303a16b01a17ec07f6302ae", "uploadMethod": "PUT", "uploadHeaders": { "content-type": "image/png" } } ] }, "requestId": "8706bdb65176ca2782bbb41d4845bb8a", "code": "200", "message": "SUCCESS" }
Important: After obtaining the file upload credentials, send a
PUT request to the pre-signed URL returned in uploadUrl
with the headers returned in uploadHeaders to upload the file(s) to public
storage.Request example
PUT https://novo-one-tst-self-operated-business.s3.ap-east-1.amazonaws.com/public/platform/3076913644890832896/auto_phone/Wallpaper.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20261030T061426Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Credential=AKIA6ODU5BKBMSDIXP4N%2F20261030%2Fap-east-1%2Fs3%2Faws4_request&X-Amz-Expires=900&X-Amz-Signature=ef27d5b419636f12772f85c18d35910de781644ff303a16b01a17ec07f6302ae HTTP/1.1
Host: novo-one-tst-self-operated-business.s3.ap-east-1.amazonaws.com
Content-Type: image/png
<binary file content>
Note:
<binary file content> represents the raw
binary bytes of the target file.Figure: Request example in Postman

Response
example
HTTP/1.1 200 OKNote: To prevent the file from being deleted after the Time To Live
(TTL) specified for
ttl, confirm the file upload via the Confirm the File Upload interface before the TTL expires.