All Products
Search
Document Center

Edge Security Acceleration:UploadFile

Last Updated:Jun 25, 2026

Uploads a refresh or prefetch file to improve access speed.

Operation description

Note
  • The maximum file size is 10 MB.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

SiteId

integer

Yes

The site ID. You can obtain it by calling the ListSites operation.

123456789****

Url

string

Yes

The URL of the refresh or prefetch file stored in OSS. Two URL formats are supported:

  • Transit URL (recommended): automatically generated by the file transfer feature of the ESA console or SDK.

  • OSS pre-signed HTTPS URL: generated after you upload the file to an authorized OSS bucket. The isFileTransferUrl field specifies whether to use the transit URL mode.

https://xxxxx.oss-cn-shenzhen.aliyuncs.com/test_oss_file?Expires=1708659191&OSSAccessKeyId=**********&Signature=**********

Type

string

Yes

The type of the refresh or prefetch task. Valid values:

  • file (default): file refresh.

  • preload: file prefetch.

  • directory: directory refresh.

  • ignoreParams: parameter-ignored refresh.

Valid values:

  • file :

    File refresh.

  • ignoreparams :

    Parameter-ignored refresh.

  • preload :

    File prefetch.

  • directory :

    Directory refresh.

file

UploadTaskName

string

Yes

The name of the upload task.

purge_task_2024_11_11

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F

UploadId

integer

The file upload task ID. You can use this ID to submit or query the task.

159253299357****

Examples

Success response

JSON format

{
  "RequestId": "3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F",
  "UploadId": 0
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidTime The query time cannot exceed the last 3 days. The query time cannot exceed the last 3 days.
400 MissingParameter.ObjectType The ObjectType parameter is required if DomainName or ObjectType is specified. Specify the ObjectType parameter.
400 InvalidParameters The specified parameters are invalid. Parameter is illegal.
400 ExceedFileUpload The size of the uploaded file exceeds the upper limit. Select a file less than 10 MB. The size of the uploaded file exceeds the upper limit. Select a file less than 10 MB.
400 TooManyRequests Too many requests.Please try again later. Requests are too frequent, please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.