118
Views
5
Comments
Solved
How to save a file to the database with upload component (REACTIVE)
Question
Service Studio Version
11.54.25 (Build 62773)


I looked at several discussions about it, but none of them were useful to me. I want to upload a pdf file through the (Upload) component and I want its binary to be saved in the database. How do I do that? I posted some photos to show how I've done it so far. 






Upload5.png
Upload4.png
Upload2.png
Upload3.png
Upload1.png
2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello @vn_perpetuo 

I see you are trying to upload a file in a list, Are you getting this list from API or it is bind with a Database table?

If it is a database table,  then instead of using those local variables you need to bind your upload widget with a aggregate.

I have created one sample to upload a file within a list, please check and let me know if it works for you 

https://personal-ejuytnht.outsystemscloud.com/SampleForumPOCS/SampleBinFileUpload?_ts=638313147867676970

Thanks
Tousif Khan

SampleForumPOCS.oml
2023-08-07 18-02-23
Parveen Khan

Hi vn_perpetuo,

Here I attached OML for your understanding. 

Hope it will help you.


Thanks & Regard,

Parveen 

UploadPDF.oml
2023-08-29 14-56-14
vn_perpetuo

Hi Parveen, thanks for the help.

In my case, "CreateOrUpdate" does not appear as an option, can you tell me why?

2023-09-05 06-31-18
Pavan Rajapurkar

Hello,

I think your database is in the core and its expose to read only is set to Yes. This means that you cannot use the CRUD operations outside the module.

May be because of that you are not able to see the CRUD functionality. You can create the Upload logic in the core module and use the server action in the End User module.

This action will be in core module.

 Add it through manage dependency in the end user module and use it on Upload click.

Hope it helps you..


Regards,

Pavan R

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello @vn_perpetuo 

I see you are trying to upload a file in a list, Are you getting this list from API or it is bind with a Database table?

If it is a database table,  then instead of using those local variables you need to bind your upload widget with a aggregate.

I have created one sample to upload a file within a list, please check and let me know if it works for you 

https://personal-ejuytnht.outsystemscloud.com/SampleForumPOCS/SampleBinFileUpload?_ts=638313147867676970

Thanks
Tousif Khan

SampleForumPOCS.oml
2023-08-07 18-02-23
Parveen Khan

Hi, Please check your expose read-only property of the entity. It should be NO when you are using another module.


Thanks.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.