FileUpload In A Popup. How to store temporary file in modal after user uploaded ?

Hi Community,


Lets say a user have uploaded a image file,he can see that same filename when he log in the next day.

May i know how to store and show to the user the same file name he have uploaded ?


https://www.outsystems.com/forums/discussion/35660/list-of-attachments-files-issue/


This post explain how to do the link from the user uploaded file and download it.

I have create 3 local temporary variable files.

I not sure how to keep the temporary file name inside the popup file uploader before the user press the save button.



Best Regards,

Wen Kai


Hi Wen Kai,


i don´t know if i understand your problem, but if you want to store and see something in the future you have to save it somewhere, in draft mode, version mode.


If i couldn't help you, tell me.

Best regards,

PVN

Hi,

If you want the user to access something he uploaded in different day you will need to save it in the database. Now you have a couple of options on how to do this or you have a button saying save draft and this temporarily saves the uploads he did. or you trigger an action after the user upload something like describe in this post.

Regards,

Marcelo

Pedro Vila Nova wrote:

Hi Wen Kai,


i don´t know if i understand your problem, but if you want to store and see something in the future you have to save it somewhere, in draft mode, version mode.


If i couldn't help you, tell me.

Best regards,

PVN

Hi Pedro Vila Nova,


My case is a form with fields for user to fill in and a upload file button which open the popup modal for uploading file. 

When user close the popup press create or save draft in the main screen,it will save all the fields and uploaded files by user.

I already save in a temporary file table in database.

My problem is the file only appear for the brief moment after user uploaded.

I want the file that user uploaded show to the user next time when user log in.

I not sure how to get that expression of uploaded file to stay there once the user close the popup modal

Sorry i didn't explain clearly enough.


Best Regards,

Wen Kai



Marcelo Ferreira wrote:

Hi,

If you want the user to access something he uploaded in different day you will need to save it in the database. Now you have a couple of options on how to do this or you have a button saying save draft and this temporarily saves the uploads he did. or you trigger an action after the user upload something like describe in this post.

Regards,

Marcelo

Hi Marcelo Ferreira,


I already save in temporary file database before sending to the actual file database.

From what i understand, this post explains that a hidden button can trigger uploading when user click on the choose file file of upload1.widget and upload the file directly without clicking on the button.

May i know what is this the correct meaning?


Best Regards,

Wen Kai

Solution

Hi Wen Kai!

As mentioned by Marcelo Ferreira in his post, yes, as long as the image file is saved in the database.

As for getting the filename of the image file a user uploaded at an earlier date and then displaying its filename in the Upload widget:

In the Preparation of the webscreen/popup/modal where the File Uploader for the image is located, you could get the entity where you saved the image file as an aggregate source, filter it by the attribute where you saved the UserId of the person who uploaded and saved the image file, and then assign the image file name in the filtered row/s to the Upload widgets filename runtime property.

P.S. You may need additional filters in your aggregate to ensure that the desired image filename is correctly displayed in the Upload widget.

Best regards,
Joseph Enriquez

Solution