Hi Team,
I am implementing small application using Reactive Web app and trying to upload files from UI side. could you please explain how to achieve this.
since i tried with only single file and trying upload with other file it was replacing previous file. i want both files to be included.
please suggest me.
Regards,
Kishore
Hi @kishore
You are removing this out of the list and we need to pass the curret row which we need to remove, so we use list remove client action for that and we pass the row number
I am attaching the updated OAPSample - https://personal-ejuytnht.outsystemscloud.com/Email/Email?_ts=638229685095546607Since this post was related to upload, if you have further more question you can ipen up a new post or you can ping me and I'll help you with it.
Thanks
Hello kishore reddy, I believe that your problem is related to the saving action. Try to debug it, but you are saving the files in a way the previous one is replacing. You can look also at the documentation here:
Best regards,
Ana
Hi Ana Agostinho,
i tried with upload file component which is available in outsystems. but it is taking only one file. i want attach more files at at time.
can you please guide me.
Hello
do you want to upload all files at once, in that case, you can use a forge available
Make sue you have designed your data model in such a way that you can store multiple files
https://www.outsystems.com/forge/component-overview/8411/reactive-multiple-file-upload
ThanksTousif Khan
Hi @kishore reddy,You may try making a list of a structure with attributes for filename and binary data and that will be used to make uploading of multiple files possible. In terms of saving, make sure to save everything and not only the first one in the list. I suggest use a loop to save everything in the list.
Hope this helps.
Regards,Alec
Could you please share any sample code how to build. I used 'Email_Struct' under Structures folder in Data tab.
Actually i created sample app Email send from UI screen i giving To, CC, and subject also adding files attach. here i can only upload one file not more while sending email to recipient.
Hi @kishore reddy,I created a sample screen and logic for the idea that I have shared with you on how to implement multiple file uploads.In this screen, I only used an upload widget, with a list that displays everything that is added to the list that is ready for upload.And in this screen above, I used 2 local variables, one for storing the current uploaded file and another for the list of files ready for upload. I haven't added the saving part, but you just need to used a for loop to save everything that needs to be uploaded. Also, removal of items that were added to the list can also be achieved but I did not also included it here. Hope you get the idea and this reply helps you move forward to achieve your goal.Regards,Alec
Thanks for your reply. but still i can upload one file. attached OAP file for reference.
Hello @kishore reddy
I have Updated your Oml with the use case, now you can upload files one by one.
and you have multiple files in your list.
But I dont see any database on your application. So how you are planning to save those file to your database?
Sample - https://personal-ejuytnht.outsystemscloud.com/Email/Email?_ts=638229536616766852
Hi @Tousif Khan
Thank you. i am not storing this data in my Application data base anywhere. this is simple i am trying to send email to my personal emails with one or more attachment files list.
Did this work for you? Are you able to find the solution for this, If any of the solution works for you mark the post as a solution. for future references for other people.
Hi Khan,
yes, it is working good. now i want to remove few attachments which i already attached. i written a logic but it is not working as expected.
could you please review code and let me know where i need change.