DEV Community

asposewords
asposewords

Posted on

Uploading a document to Aspose.Words Cloud Storage (C# / .NET)

Before you can use the Aspose.Words Cloud API (or other Aspose Cloud APIs) to read and update existing documents the files will need to be loaded into the Storage in the cloud.

The Aspose.Storage Cloud API can be directly accessed via the REST API but this sample will use the Cloud SDK for .NET to make the code simpler.

To begin you will need the SDK downloaded (either the DLL or the source code) and to sign up for a set of credentials by creating an account and requesting a set of API keys. See https://dashboard.aspose.cloud/

The sample code below shows a simple function to upload a file to Storage by supplying your API keys, local file name and where you want to store the file on Storage.

The essential steps are to:

  1. Open the StorageApi using your app keys
  2. Create a PutCreateRequest and pass in details of the file
  3. Call the PutCreate method
  4. Check the result

Oldest comments (0)