Page 1 of 1
Uploading a PNG image, and uploading records to DB Table
Posted: April 12th, 2022, 1:12 pm
by smoady
Trying to upload a png image file and add it to a DB table with 3 columns (image, download link, fileLink). I set the columns to have the needed controls (image control, FileDownload control, hyperlink control). I'm using an insert service to add the uploaded file to the table, but it is returned as an empty row of records as shown in the screenshot.
How can I upload a file and add it to a table with such 3 columns?
Re: Uploading a PNG image, and uploading records to DB Table
Posted: April 15th, 2022, 8:59 am
by SteveCap
Here is a sample page using the FileUpload control in EASYProcess 5.1 Classic.
The button that is going to be processing the upload needs to have it's AjaxEnabled property set to False.
To get information about the uploaded file use the GetHttpPostedFileInfo service with the PostedFileName taking in the name of the FileUpload control.
To save the file use the SaveFileUpload service. UploadedFileName takes in the name of the FileUpload control, SaveToFileName is the name the file will save as, Location is App or Web depending on where you want the file to save, and KeepExtension is True or False. if True will append the extension to the end of the SaveToFileName.
I am then using the SetControlProperty service to show the output of both services on the page.
- image.png (22.96 KiB) Viewed 869 times
- image.png (22.96 KiB) Viewed 869 times
Download the page here: