How to create a server action to upload and download documents

How to create a server action to upload and download documents

  

Hi,

Could please help me with this on "How to create a 'SERVER ACTION' to upload and download of various documents, so that everyone can use in their module".



Hi Melody,

Please see the attached oml , i have created a very simple example to upload document and to download the same.



Regards

-PJ-

Melody Begum Syed wrote:

Hi,

Could please help me with this on "How to create a 'SERVER ACTION' to upload and download of various documents, so that everyone can use in their module".

Hi Melody,

Uploading and Downloading documents are Interface operations, they cannot be done in a SERVER ACTION. You need to use the Upload widget (on a Screen) and the Download statement (as the final node on an Action Flow) in order to, respectively upload the document to the server and download the document from the server.

You can have a server action that fetches a BinaryData (your document) from the database (so you can then download it), and you can have another server action that receives a BinaryData (your document) and stores it in the database (after the user uploaded it).

 Thank You Pramod

Hi Melody,

Please see the attached oml , i have created a very simple example to upload document and to download the same.



Regards

-PJ-



Thank You Jorge, my issue is resolved.

Melody Begum Syed wrote:

Hi,

Could please help me with this on "How to create a 'SERVER ACTION' to upload and download of various documents, so that everyone can use in their module".

Hi Melody,

Uploading and Downloading documents are Interface operations, they cannot be done in a SERVER ACTION. You need to use the Upload widget (on a Screen) and the Download statement (as the final node on an Action Flow) in order to, respectively upload the document to the server and download the document from the server.

You can have a server action that fetches a BinaryData (your document) from the database (so you can then download it), and you can have another server action that receives a BinaryData (your document) and stores it in the database (after the user uploaded it).