Uploading a PNG image, and uploading records to DB Table

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
smoady
Posts: 23
Joined: February 4th, 2022, 3:52 pm
Contact:

Uploading a PNG image, and uploading records to DB Table

Unread post 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?
UploadFileToDBTable.png
InsertService.png
Last edited by smoady on April 15th, 2022, 11:38 am, edited 1 time in total. word count: 81

Tags:
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

Re: Uploading a PNG image, and uploading records to DB Table

Unread post 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.
image.png
image.png
To get information about the uploaded file use the GetHttpPostedFileInfo service with the PostedFileName taking in the name of the FileUpload control.
image.png
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.
image.png
I am then using the SetControlProperty service to show the output of both services on the page.
image.png
image.png (22.96 KiB) Viewed 871 times
image.png
image.png (22.96 KiB) Viewed 871 times
Download the page here:
UI-11000009.xml
(214.69 KiB) Downloaded 147 times
UI-11000009.xml
(214.69 KiB) Downloaded 147 times
word count: 169
Post Reply