2.06 File Uploads - andperry256/my-base-theme-and-dbadmin GitHub Wiki

File Uploads

It is possible to perform file uploads via the record edit screen. The record must contain a text field for the storage of the filename and the entry for that field in dba_table_fields must have the widget type set to file. For a file widget, the following two fields in dba_table_fields come into operation:-

  • relative_path - This is the sub-directory path in relation to the root (public_html) directory where the uploaded file is to be stored.
  • allowed_fileypes - This contains a comma separated list of allowed file types, for example:-
    .pdf,.txt

The file will be stored in the destination with the same name as the source file. This means that two files with the same name cannot be stored as separate entities. The file widget in the edit screen contains a checkbox to confirm whether the overwriting of an existing file is to be allowed.

⚠️ **GitHub.com Fallback** ⚠️