Simple way to get a file from storage


#1

Hello,

I might be missing something but I can’t find a simple way to return/download the file from storage.

If I use http://api.aspose.cloud/v1.1/storage/file it just returns a binary stream (Content-Type →application/octet-stream).

Is there a way to simple trigger a normal download of the file, saved with the same name and file extension as it is being stored as?

Thanks


#2

@patrick_daly

Thank you for contacting us.

Please check Download a Particular File article, we have provided cURL Example as well as SDK Examples to download a file from Cloud Storage.

If you still have any confusion, please feel free to contact us.


#3

But this is still an octet-stream: http://prntscr.com/kn6jxf

Is there any way to generate a normal file link for a user to click?


#4

@patrick_daly

Is there any way to generate a normal file link for a user to click?

You cannot do this with Aspose Cloud Storage. But Aspose Cloud let you use third-party storage e.g. Dropbox, Google Drive, Amazon S3 as a Storage Provider.

We know Dropbox let us create a link that we can share with users to click/view the file. So let’s take Dropbox as an example.

First, go through Configure DropBox Storage article that explains how you can integrate your Dropbox Storage with Aspose Cloud. Once integrated, all files will be saved in your Dropbox Storage instead of Aspose Cloud Storage. At Dropbox, you can simply create “Share Link” of a file and share with your users to click/view the file.


#5

I don’t mean a link like a sharing link, I just mean one that doesn’t return a binary/octet-stream.

It seems very strange that we can generate an XLSX file but your API doesn’t return an XLSX file - only binary.


#6

@patrick_daly

It seems very strange that we can generate an XLSX file but your API doesn’t return an XLSX file - only binary.

The API returns XLSX file, you just have to save the returned response in .xlsx format.

I am not sure why are you trying to download the file via API Reference page? If you need a User Interface to download a file, please go to “My Files” section of https://dashboard.aspose.cloud/#/files and download the desired file as shown in the following screenshot:

If you want to download a file via GET /storage/file API, please go through the Download a Particular File article it contains all the required details.

If you still have any confusion, we may arrange a Skype call and I will give you a live Demo on how to download a particular file.