Aspose.Cells Cloud Upload File API – An Interface for Fast Uploading of Files in the Cloud

Aspose Cells API: Upload File

Prerequisites: Before calling this endpoint you must obtain an OAuth 2.0 access token using your Aspose Cloud client ID and client secret. Include the token in the Authorization: Bearer {access_token} header. The token must have the Storage scope. See the authentication guide for details.

PUT http://api.aspose.cloud/v4.0/cells/storage/file/{path}

Function Description

The uploadFile API enables developers to upload files directly to cloud storage for processing with Aspose Cells.

Security and Authentication

The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.

-H "Authorization: Bearer {access_token}"

The request parameters of the uploadFile API are

Parameter Name Type Path/Query String/HTTP Body Description
UploadFiles File FormData Upload files to cloud storage.
path String Path The destination path in the cloud storage. Specify the path where the file should be uploaded.
storageName String Query The name of the storage where the file will be uploaded.

cURL Example

curl -X PUT "https://api.aspose.cloud/v4.0/cells/storage/file/Folder/Book1.xlsx" \
  -H "Authorization: Bearer {access_token}" \
  -F "UploadFiles=@/path/to/Book1.xlsx" \
  -F "path=Folder/Book1.xlsx"

Response Description

{
  "Name": "FilesUploadResult",
  "Description": [
    "File upload result"
  ],
  "Type": "Class",
  "IsAbstract": false,
  "Properties": [
    {
      "Name": "Uploaded",
      "Description": [
        "List of uploaded file names"
      ],
      "Nullable": true,
      "ReadOnly": false,
      "IsInherit": false,
      "DataType": {
        "Identifier": "Container",
        "Reference": "String",
        "ElementDataType": {
          "Identifier": "String",
          "Name": "string"
        },
        "Name": "container"
      }
    },
    {
      "Name": "Errors",
      "Description": [
        "List of errors."
      ],
      "Nullable": true,
      "ReadOnly": false,
      "IsInherit": false,
      "DataType": {
        "Identifier": "Container",
        "Reference": "Error",
        "ElementDataType": {
          "Identifier": "Class",
          "Reference": "Error",
          "Name": "class:error"
        },
        "Name": "container"
      }
    }
  ]
}

The API returns the following HTTP status codes:

Status Code Description
200 OK File uploaded successfully.
400 Bad Request Invalid parameters or malformed request.
401 Unauthorized Missing or invalid authentication token.
403 Forbidden Insufficient permissions for the specified storage.
500 Internal Server Error Unexpected server error.

For a complete list of error codes, refer to the Error Codes reference.

Best Practices

  • Ensure the file size does not exceed the service limit (default 500 MB).
  • Use HTTPS endpoints to protect data in transit.
  • Retry transient failures (e.g., 5xx responses) with exponential back‑off.
  • Validate file formats before uploading to avoid unnecessary errors.

OpenAPI Specification

The OpenAPI Specification provides a detailed description of the API, enabling developers to interact with it directly via a web browser.

Aspose Cells API SDK

Utilizing an SDK enhances development efficiency by managing low‑level details, allowing developers to concentrate on project tasks. Visit the GitHub repository for a comprehensive list of Aspose.Cells Cloud SDKs.

The following code examples illustrate how to call Aspose.Cells web services using various SDKs:

See also