Free Support Forum - aspose.cloud

Subfolders on third party storage

Hi,


I use aspose.word for cloud to convert documents to pdf with third party storage (google drive) as explained in the samples. It workes fine, as long the document is in the root or in a folder in the root. But if it’s deeper then I get an empty response. I use java, here is the call:

String strURI = “http://api.aspose.com/v1.1/words/” + fileName
+ “?format=pdf&storage=” + thirdPartyStorageName + “&folder=” + folderName;
String signedURI = Utils.Sign(strURI, appKey, appSID);
InputStream responseStream = Utils.ProcessCommand(signedURI, “GET”);

folderName is like “folder/subfolder/subsubfolder/…”

Hi Peter,

Sorry, I was unable to reproduce this issue at my end. I used the same URI with Google Drive storage and sub-folders. Following were the parameters I passed.

"?format=pdf&storage=MyGoogleDriveStorage&folder=Folder1/Sub1/Sub2"

Please share your complete code including correct folder names. You can copy your code in a text file and follow http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx to send that text file to me.

Best Regards,

Hi,


I don’t think that sending the complete code would help, it’s mostly about the gdrive API, aspose is used only here:

logger.info("convert URI: " + strURI);
String signedURI = Utils.Sign(strURI, appKey, appSID);
InputStream responseStream = Utils.ProcessCommand(signedURI, “GET”);

it logs: INFO: convert URI: http://api.aspose.com/v1.1/words/r1.docx?format=pdf&storage=drive&folder=ee/ff

So the parameters are the same as you used, still it returns an empty stream. If the document is in ee only, or in the root then it works perfectly.

Meanwhile I have learnt that in google drive it can happen that a folder is not accessible from the root. For example I can delete ee, and ff still remains accessible. How can I reach it by aspose in this case?

BR
Peter

Hi Peter,

When I delete a folder from Google Drive storage, it also deletes all sub-folders. How can you access sub-folder after deleting main folder? However, if you have deleted ee folder and ff folder is still there, you should pass &folder=ff in that case.

You can also follow http://www.aspose.com/docs/display/rest/Get+a+List+of+all+Files+and+Subfolders to get a list of files and folders. This will give you the idea what folder structure exists on your storage. If you still find any issue, you can share your App SID and Key by following http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx.

Best Regards,