Free Support Forum - aspose.cloud

Unable to know what value to put in storage in apireference.aspose.cloud


#1

apireference.aspose.cloud/pdf/#/Convert/GetPdfInStorageToHtml
I’ve uploaded a .pdf file in my Aspose Cloud Storage and specified the file name in name parameter
I don’t know what value to put in storage so that it takes the file from Aspose Cloud Storage.

I don’t understand why it is giving error of AmazonS3
{
“error”: {
“code”: “errorAmazonS3Storage”,
“message”: “AmazonS3 Storage exception: The specified key does not exist. Bucket ‘afc-filestorage’, FilePath ‘82234/e07a37e0-fd23-4755-a3d4-305698922264/ccnf-en’”,
“description”: “Operation Failed. The remote server returned an error: (404) Not Found.”,
“innerError”: {
“requestId”: null,
“date”: “2019-09-19T10:44:40.1757583Z”
}
}
}


#2

@HemantJain

Thanks for your inquiry. Please note if you are using Aspose Cloud storage then you do not need to set storage path, because Aspose.Cloud APIs take Aspose Cloud storage as default storage. Please double check the path of the file, whether it is at the root or in some folder and use path accordingly. Secondly, please also check you are using correct credentials.

For example, sample cURL command with default parameter values look like:

// First get JSON Web Token for authentication
// Get App Key and App SID from https://dashboard.aspose.cloud/
curl -v "https://api.aspose.cloud/connect/token" 
-X POST 
-d "grant_type=client_credentials&client_id=[APP_SID]&client_secret=[APP_KEY]" 
-H "Content-Type: application/x-www-form-urlencoded" 
-H "Accept: application/json"

curl -X GET "https://api.aspose.cloud/v3.0/pdf/Test.pdf/convert/html" -H "accept: multipart/form-data" -H "authorization: Bearer [Access_Token]" --output C:/Temp/Test.zip


#3

Thank you for you response.
As you have said, i’ve only mentioned file name which is on root of Aspose cloud storage. Below is the response i’hv received.
Also, i’ve associated Dropbox storage, if i wish to use this then what should be the value in the storage field. Can you please explain the use of the watermark “storage - The document storage”?

image.png (101.4 KB)


#4

@HemantJain

Please check the description of the API, it returns resulting file in response(as stream). You can use it as per your requirement. For example, in cURL you can save resultant stream to file as follows. And you can also check SDK of your choice with examples from github repository.

Get /pdf/create/html

curl -X GET "https://api.aspose.cloud/v3.0/pdf/test.pdf/convert/html" 
-H "accept: multipart/form-data" 
-H "authorization: Bearer [Access_Token]" 
--output C:/Temp/Test.zip

#5

Please note if you are using other than the default storage(Aspose default storage) then you need to pass storage name using the storage parameter. Please check the following documentation for details, hopefully it will help you to accomplish the task.

Configure DropBox Storage


#6

Got you. Thank you very much for your help.