Agile-Developer

Agile Developer

File upload fields in forms

Axpert 11

TStructs (Forms)

IViews

Scripts

Axpert Jobs

Axpert Cards

HTML Plug-ins

Users & Roles

Workflow

Axpert API

Application Var/Params

Publish Axpert Apps

Axpert Mobile

Settings

Utilities

Customization

WebServices

Axfast

File Uploads in Fields Form

These are fields that provide options to users to upload one or more files. Each file name will be shown as a tag within the field. The file names are stored in the field as comma-separated values. There can be more than one file-upload field in a form. These may be added to grid frames too. The name of a file-upload field should be prefixed with AxpFile_.
Agile developer lowcode Fields Form
By default, the uploaded files are stored in a database table. The name of the database table will be TransId+FieldName. The transid is the name of the tstruct/form. The field name is the name of the file-upload field without the prefix AxpFile_.
Agile developer lowcode AxpFile
Example:
If the transid is ‘form1’ and the file-upload field name is ‘axpfile_mydocs’, the table name will be form1mydocs.
It is not very efficient to store file uploads within the database. The uploaded files may be stored in a file server at a given path. Set the file server name in app variable named AxpFileServer<. The file path should be set in AxpFilePath.
Agile developer lowcode Axp FilePath
If the file server is protected with a password, it should be set in AxpFileUser and AxpFilePwd.

Example:
To store in all files in a server named DocServer in path E:\Axpert\FileUploads with user name AxpertFileUploader, password Agile.01
Go to App Vars option under utils in developer site.Add the following vars:

AxpFileServer={\\docserver}
AxpFilePath={E:\Axpert\FileUploads}
AxpFileUser={AxpertFileUploader}
AxpFilePwd={Agile.01}

To change the path for a file-upload field in a form, add a field prefixed with AxpFilePath_. The field name should be the same as the file-upload field. The path set as a value in this field will be used to upload to the file server set in AxpFilePath app vars.

Example:
If the file-upload field name is Axpfile_mydocs, the file-upload-path field should be named AxpFilePath_mydocs. This field value should be the path (like E:\Axpert\SpecialDocs\). It may also contain along with server name like \\docserver\Axpert\SpecialDocs\.

A file name modifier may be added to the end of the file path suffixed with *..In that case, the file names will be added to the modifier string. If the file-upload-path field contains \\docserver\Axpert\SpecialDocs\202110101800*
If a file named “MyPhoto.jpg” is uploaded, it will be stored in
\\docserver\Axpert\SpecialDocs\202110101800myphoto.jpg