Hi All,

I am making small demo regarding upload document In Reactive Web Application. In this demo, I need to upload document locally in outsystems.(May be in Resource Folder? I am not Sure about it) I don't need to add filepath in database.
Is it possible to upload document locally in outsystems? How can we do that. Small code snippet would help. 

Thanks

Krishna

Hi Krishana,

May I know your exact use case? Why you want to add document locally and what do you understand by upload locally.

Actually when you upload file to resource folder it will be uploaded to server not locally on the client machine.

When you upload document in file system you will need its name to retrive it again so you have to save its name/ path somewhere in the database for future access to the file.

You should try File System forge component for upload to file system instead of database

https://www.outsystems.com/forge/component-overview/68/filesystem

Krishna Ghael wrote:

Hi All,

I am making small demo regarding upload document In Reactive Web Application. In this demo, I need to upload document locally in outsystems.(May be in Resource Folder? I am not Sure about it) I don't need to add filepath in database.
Is it possible to upload document locally in outsystems? How can we do that. Small code snippet would help. 

Thanks

Krishna

Hi Krishna,


Please gone through the below component it will help you to understand how upload functionality will work on OS.

https://www.outsystems.com/forge/component-overview/1047/upload-image-and-display-in-grid

Krishna Ghael wrote:

Hi All,

I am making small demo regarding upload document In Reactive Web Application. In this demo, I need to upload document locally in outsystems.(May be in Resource Folder? I am not Sure about it) I don't need to add filepath in database.
Is it possible to upload document locally in outsystems? How can we do that. Small code snippet would help. 

Thanks

Krishna

I didn't get, you want to upload as a resource or you want to upload at runtime?


Krishna Ghael wrote:

Hi All,

I am making small demo regarding upload document In Reactive Web Application. In this demo, I need to upload document locally in outsystems.(May be in Resource Folder? I am not Sure about it) I don't need to add filepath in database.
Is it possible to upload document locally in outsystems? How can we do that. Small code snippet would help. 

Thanks

Krishna

Hi if you want to upload the resource you can do it here: 

than choose the file you want to upload

If you wanna upload on runtime check these forge components:

https://www.outsystems.com/forge/component-overview/7917/dropzone-reactive

https://www.outsystems.com/forge/component-overview/7405/reactfilepondupload


Hi Krishna Ghael,

Please clarify what is your intention:

  1. Upload a file from your local machine into your application and store it in the server's DB;
  2. Upload a file from your local machine into your application but not send it to the server (only display or manipulate from the browser directly);
  3. Your application accesses the server's filesystem to store in the database a file that's already on the server (or accessible via a shared folder)

For 1. and 2. you need to use the Upload widget; for 1. you additionally need to create/update some entity record to store the file in the database

For 3., you need to use the FileSystem forge component that Nikhil mentioned, that will allow your Server Actions to access the server's file system and then create/update some entity record to store the file in the database

Hope this helps.

If you dont want to add file path just add binary type attribute in your entity. (Add a new entity for this with identifier of other entity for which you want to upload image). and store file as binary there.

You can extract directly from there and can show/download.

Pls go through this link:

 https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Images/Display_an_Image_Stored_in_the_Database

Jorge Martins wrote:

Hi Krishna Ghael,

Please clarify what is your intention:

  1. Upload a file from your local machine into your application and store it in the server's DB;
  2. Upload a file from your local machine into your application but not send it to the server (only display or manipulate from the browser directly);
  3. Your application accesses the server's filesystem to store in the database a file that's already on the server (or accessible via a shared folder)

For 1. and 2. you need to use the Upload widget; for 1. you additionally need to create/update some entity record to store the file in the database

For 3., you need to use the FileSystem forge component that Nikhil mentioned, that will allow your Server Actions to access the server's file system and then create/update some entity record to store the file in the database

Hope this helps.


Hi Jorge


thanks for your help.


my intention to do is no 2 scenario.

please help me out in this.