Hi,
I am using Saleforce REST API and Amazon s3 as storage. My bucket name is XYZ and I am keeping my .docx templates in QaTest folder of XYZ bucket. Then I am using ExecuteTemplate REST API to created docx file from template and it is generated in same folder But want to store generated document in ABC folder. Folder structure is as follows,
—All Buckets
— XYZ
---- QATest (Templates are stored in this folder)
— ABC (I wants to store generated document in this folder)
Can you guide me how to store generated document in ABC folder which is at same node level of QATest ??
Hi Sonal,
You can use filename parameter to specify the name and location of the output file as you can see in the following URI.
http://api.aspose.com/v1.1/words/ExecuteTemplate.docx/executeTemplate?storage=MyStorage&folder=Folder1&filename=./../Folder2/TestMailMergeResult.docx
Here Folder1 is the location where input document is present and Folder2 is the location where output file will be saved.
Best Regards,
Hi,
Thanks for your reply.
As you mentioned i created by URL as follows,
https://api.aspose.com/v1.1/words/DateChk.docx/executeTemplate?storage=XYZ &folder=Qatest&filename=./…/ABC/TEST_File%202016-02-24%2012:23:06.pdf&cleanup=EmptyParagraphs,UnusedRegions,UnusedFields,ContainingFields&appSID=XXXXXXXXXXX&signature=LdsZV022uhwkqJ5ocE8atJHfnA0
which is giving me an error as, AmazonS3 exception: The request signature we calculated does not match the signature you provided. Check your key and signing method
If I removed the ./…/ from filename is working fine and creates ABC folder inside the Qatest folder. But I wants it to store in ABC folder which is outside of Qatest folder.
Hi Sonal,
It is working with other storages. We are investigating it for S3 and will share the update soon.
Best Regards,
Hi Sonal,
You can use the following URI with POST method to move the output file to a new location.
https://api.aspose.com/v1.1/storage/file/S3BucketName/Folder2/TestOutput.pdf?storage=MyS3Storage&destStorage=MyS3Storage&dest=S3BucketName/Folder1/TestOutput.pdf
Best Regards,
Hi John,