Downloading a blob directly

21 Mar '17, 05:55 PM
2,718 Views
No Forum Badges

Hi, I have a volatile entity with oid-name-blob where i store a file to be downloaded, is it possible to, somehow, downloading the generated blob without having to press on it after it's generated?

Now: form->upload blob->generate download link->download

My request-> form->upload and download blob

Best regards

 
x 0
Follow
Answer Answer at this question and get points!
Forum Hero - Level 9

Hi Simone,

you could refer to the solution reported in this article http://my.webratio.com/learn/learningobject/how-to-show-a-dialog-for-downloading-a-file-v-72.

You could extend this to your case. For example you can:
- Put a Form (based on “Temp File” Volatile Entity) with a blob Field into the Home page of the sample project.
- Draw a normal Flow between the Form and the "Create & Download Temp File" Module.
- set the Binding on the normal Flow (pass the blob Field value to "Input File" input Parameter).

In this way when you fill in the form and submit it, the content disposition dialog will show and you can download the submitted file.

   
x 1
No Forum Badges

Hi Alberto, thanks for the answer.

Can I bypass the "show dialog" part and instantly download the file when pressing the form button?

 
x 0
Forum Hero - Level 9

Hi Simone,

you could customize the main template in order to return the data stream without the part related to the content disposition.

 
x 0
Answer at this question and get points!