How can I get file data when using Upload widget

I am making a page with a "Sending Email" function.

User will input the information and attached files before click Send button.

I have a REST API that will received email information via JSON data and send to the target address.

Everything work fine except for the attached files which I am still struggle.

I plan to convert the files into base64 string to include in the JSON data. The string will be convert back into a File on REST API side.

However, I don't know how to get the file data from Upload widget.

Is there any way to do it?

Hello

Check out my question and response.


https://community.bonitasoft.com/questions-and-answers/how-upload-file-angular-application-bonita-process#node-37339

Thanks for your reply.

When user using Upload widget, the data of widget contains the tmp_path value. This mean the file was already uploaded to server and stored in temporary location. Is there anyway in Groovy script to access this file?