Working with Files

Introduction

Aspose.Slides Cloud API provides methods to work with files in Aspose Cloud Storage or any other Cloud storage of your choice. If you need any help setting up third-party storage, please refer to Aspose Cloud UI Help Topics.

Request Access Token

The cURL examples below use <access_token> template string instead of an actual token string. You can receive the access token by your client_id and client_secret as shown below. Then you can use your access token in the code examples.

DownloadFile

API Information

API Type Description Resource
/slides/storage/file/{path} GET Downloads a file from a Cloud storage. DownloadFile
/slides/async/storage/file/{path} GET Downloads a file from a Cloud storage asynchronously. Download

The two methods are identical. However, since the second is part of the async API, it does not have file size restrictions.

Request Parameters

Name Type Location Required Description
path string path true The path to a file in a storage.
storageName string query false The name of the storage.
versionId string query false The version ID of the file.

Examples

Download the Data/example.pptx file from the MyStorage storage and save it to result.pptx.

cURL Solution

SDK Solutions

UploadFile

API Information

API Type Description Resource
/slides/storage/file/{path} PUT Uploads a file to a Cloud storage. UploadFile
/slides/async/storage/file/{path} PUT Uploads a file to a Cloud storage asynchronously. Upload

The two methods are identical. However, since the second is part of the async API, it does not have file size restrictions.

Request Parameters

Name Type Location Required Description
path string path true The path to a file in a storage. If the content is multipart and the path does not contains the file name, it tries to get them from the filename parameter from the Content-Disposition header.
file file formData true The file to be uploaded.
storageName string query false The name of the storage.

Examples

Upload the example.pptx file to the Data/result.pptx path in the MyStorage storage.

cURL Solution

SDK Solutions

CopyFile

API Information

API Type Description Resource
/slides/storage/file/copy/{srcPath} PUT Copies a file in a Cloud storage. CopyFile

Request Parameters

Name Type Location Required Description
srcPath string path true The path to a source file.
destPath string query true The path to a destination file.
srcStorageName string query false The name of a source storage.
destStorageName string query false The name of a destination storage.
versionId string query false The version ID of the file to be copied.

Examples

Copy the Data/example.pptx file to the Resources/example_copy.pptx path in the MyStorage storage.

cURL Solution

SDK Solutions

MoveFile

API Information

API Type Description Resource
/slides/storage/file/move/{srcPath} PUT Moves a file to a new location in a Cloud storage. MoveFile

Request Parameters

Name Type Location Required Description
srcPath string path true The path to a source file.
destPath string query true The path to a destination file.
srcStorageName string query false The name of a source storage.
destStorageName string query false The name of a destination storage.
versionId string query false The version ID of the file to be moved.

Examples

Move the Data/example.pptx file to the Resources folder in the MyStorage storage.

cURL Solution

SDK Solutions

DeleteFile

API Information

API Type Description Resource
/slides/storage/file/{path} DELETE Deletes a file from a Cloud storage. DeleteFile

Request Parameters

Name Type Location Required Description
path string path true The path to a file.
storageName string query false The name of a storage.
versionId string query false The version ID of the file to be deleted.

Examples

Delete the Resources/example.pptx file from the MyStorage storage.

cURL Solution

SDK Solutions

SDKs

Check Available SDKs to learn how to add an SDK to your project.