Working with Files

Introduction

Aspose.Slides Cloud provides methods to work with files uploaded to Aspose Cloud Storage or any other Cloud Storage of your choice. If you need any help getting started with setting 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.

Downloading a file from Cloud Storage

API Information

API Type Description Swagger Link
/slides/storage/file/{path} GET Downloads a file from a Cloud storage. DownloadFile

Request Parameters

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

cURL Example

Download a file Data/example.pptx from a storage Main and save the file to result.pptx.

SDK Examples

Download a file Data/example.pptx from a storage Main and save the file to result.pptx.

Uploading a file to Cloud Storage

API Information

API Type Description Swagger Link
/slides/storage/file/{path} PUT Uploads a file to a Cloud storage. UploadFile

Request Parameters

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

cURL Example

Upload a file example.pptx to the path Data/result.pptx on a storage Main.

SDK Examples

Upload a file example.pptx to the path Data/result.pptx on a storage Main.

Copying a file to a new location on Cloud Storage

API Information

API Type Description Swagger Link
/slides/storage/file/copy/{srcPath} PUT Duplicates a file to a new location on a Cloud storage. CopyFile

Request Parameters

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

cURL Example

Copy a file Data/example.pptx to the path Resources/example_copy.pptx on a storage Main.

SDK Examples

Copy a file Data/example.pptx to the path Resources/example_copy.pptx on a storage Main.

Moving a file to a new location on Cloud Storage

API Information

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

Request Parameters

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

cURL Example

Move a file Data/example.pptx to the path Resources/example.pptx on a storage Main.

SDK Examples

Move a file Data/example.pptx to the path Resources/example.pptx on a storage Main.

Deleting a file on Cloud Storage

API Information

API Type Description Swagger Link
/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 file path.
storageName string query false The storage name.
versionId string query false The version ID of the file to delete.

cURL Example

Delete a file Resources/example.pptx on a storage Main.

SDK Examples

Delete a file Resources/example.pptx on a storage Main.