Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
This API is used to upload a file from your client or server to AppGallery Connect.
HTTPS is used for APIs between the browser or client and the server. The Content-Type header must be in the application/octet-stream format. Files must be encoded in application/octet-stream format and attached to an HTTPS packet.
Currently, this API can upload app packages in APP format (HarmonyOS apps or atomic services).
Callers of this API include account holders, administrators, app administrators, and operations personnel.
Protocol | HTTPS PUT |
|---|---|
Direction | Your server -> Huawei server |
URL | URL obtained in Obtaining the File Upload URL. |
Data Format | Request: Content-Type: application/octet-stream Response: Content-Type: application/json |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
Authorization | Yes | String | Authorization information. This parameter corresponds to Authorization in the headers parameter returned by the API for obtaining the file upload URL. |
x-amz-content-sha256 | Yes | String | SHA-256 hash value of the file object content. This parameter corresponds to x-amz-content-sha256 in the headers parameter returned by the API for obtaining the file upload URL. |
x-amz-date | Yes | String | File upload URL generation time. This parameter corresponds to x-amz-date in the headers parameter returned by the API for obtaining the file upload URL. |
Host | Yes | String | Address of the server to which the file is to be uploaded. This parameter corresponds to Host in the headers parameter returned by the API for obtaining the file upload URL. |
user-agent | Yes | String | User agent. This parameter corresponds to user-agent in the headers parameter returned by the API for obtaining the file upload URL. |
Content-Type | Yes | String | Object content type. This parameter corresponds to Content-Type in the headers parameter returned by the API for obtaining the file upload URL. |
The request body contains the file content in binary mode. The corresponding Content-Type is application/octet-stream. The file size must be the same as the value of contentLength set when the upload URL is obtained.
If the API returns the HTTP status code 200, the file is successfully uploaded.