Configuring File Upload to a BLOB Column

Configure a File Upload item to store an uploaded file in a BLOB column with related metadata.

After creating a form region on your table containing the BLOB file column, set the item type of the BLOB column to File Upload. Set the Storage > Type to BLOB column specified in Item Source attribute. Check the Source section in the Property Editor to ensure the expected BLOB column is selected. Finally, as shown below, configure the column names for the:

Setting up these additional column names is important. It ensures the browser handles the file correctly when viewed or downloaded.

Tip: Enable the Primary Key switch for form items tied to primary key columns. (e.g. P23_ID here)

To allow only a subset of file types - for example, only PDF files - set the File Types field to a comma-separated list of file extensions and MIME type strings. For PDF files, the extension is .pdf and the MIME Type is application/pdf. These values inform the system file picker to help users to pick the kind or kinds of file your application needs.

If you set a Maximum File Size, then the user sees a helpful validation error like the following. Then they can pick another file and try the upload again:

Configuring File Upload Page Item

Description of the illustration configure-file-upload.png

Then, in the Processing tab of the Page Designer tree, ensure you have:

Tip: The Create Page Wizard creates the DML page process on a new Form page, and sets the Database Action property to SQL INSERT action on the CREATE button. However, when you add a Form region to an existing page you need to do these two steps yourself.

Ensure Automatic DML Page Process Targets the Form

Description of the illustration process-upload-file.png