Usage Scenario: User Document Upload Module

In a web application, users should be able to upload documents such as IDs, diplomas or certificates and then view, download and, if necessary, delete them. Documents should be stored in user-specific directories and process steps should be traceable through the system.

File upload

  1. Click on the Big File Upload element.
  2. In the Properties panel on the right side, in the Label field, type “Upload your document”.
  3. Then in the Hint field type “You can only upload .pdf, .jpg or .png extensions. Max. size: 200 MB”.
  4. When the upload is complete, the following actions are triggered:
    • File ID and File Name are retrieved from the system.
    • It is associated with the related record in the user table and saved to the database.
INSERT INTO user_documents (user_id, file_id, file_name, upload_date)VALUES ({{currentUser.userId}}, {{uploadedFileId}}, {{uploadedFileName}}, NOW());

The File ID will be the reference for all downloads and deletions. No action can be taken without saving.

File download

  1. Add a Button element from the Elements panel on the left side.
  2. In the Properties panel, type “Download Document” in the Label field.
  3. Choose OnClick → Device → Download File From Server from the +ADD ACTION menu.
  4. Edit the following field:
    • File ID: Enter the unique ID number of the file to download. (Ex: {{{selectedDocument.file_id}})

File deletion

  1. Add a Button element from the Elements panel on the left edge.
  2. In the Properties panel, type “Delete Document” in the Label field.
  3. Choose OnClick→ Device → Delete File From Server from the +ADD ACTION menu.
  4. Edit the following field:
    • File ID: Enter the unique ID number of the file to be downloaded. (Ex: {{{selectedDocument.file_id}}})

The user must be presented with a confirmation screen before deletion. The deleted file cannot be recovered.

This example scenario is using Big File Upload;

  • File upload,
  • File-based data recording,
  • Secure downloads and deletions,
  • Authorization and user control is provided.