Upload/Download files

  
Hi everybody,
I am a new user who is enjoying a lot Outsystems platform.
I am completely new to the world of programming but I am trying to create a simple DB with the Agile Platform.
My database has already the basics which I managed to put following the online tutorial, but now I would like to add some more feature.

In particular I would like to add the option to upload and download files for each entry in the database.
I didn't find any tutorial on this, I saw that there is a widget to upload a file, but not one to download.

I would appreciate if someone could help in setting up the upload/download function.

Many thanks in advance,
Stefano
Hi Stefano,

Welcome to the OutSystems Community.
To add file to an entity just add attributes for the filename and filecontent (type BinaryData).
Then, as you say, you can use the Upload widget on a web screen to allow the user to upload a file.
To download it you can use the Download element.

You can check the eSpace in attachment for an example.

Cheers,
Tiago Simões
PS: A good way to learn is also to take a look into these apps

Tiago Simões : can u please send the same oml ie UploadDownloadFiles.oml in 7.0.1.7 version
Hi n p,

You can find a 7.0 version in atachment.
One important thing to note is to try not use the binarycontent files from the preparation queries. Instead of that it is better to get the record again in the screen actions in order to improve performance.

Cheers,
Tiago Simões

Hi Tiago,


Can you please attach the same file for 9.0.1.25 version.


Thank you very much.


Christopher
Hi Christopher,

That last version seems to work correctly on 9.0.1.25 (as long as you upgrade it with Service Studio).

Cheers,
Tiago Simões
Hi Tiago,

Many Thanks. I can open it now...

Best Regards,

Christopher
Tiago Simões wrote:
Hi Christopher,

That last version seems to work correctly on 9.0.1.25 (as long as you upgrade it with Service Studio).

Cheers,
Tiago Simões
 
 
that is very nice one, could you please put a video on how  you make a webpage like this.
many thanks
Hi Tiago,

For the Upload button, in the DocumentFile_Edit Web Screen, can I use AJAX Method instead of SUBMIT? I still have much to learn on this platform.

Thank  you very much.

Kind regards,

Christopher
Hi Christopher,

No, Upload widget can only work with submit.

Cheers,
Tiago Simões
I have tried with all the above steps.... i  can choose my document,but if once i press submit button my attachment gets disappear... why it is? 
Hi... I have done uploading and downloading functions in my application..! but if i attach a document without uploading..... it takes the prevoius uploaded file..... i have attached my oml........