A field "Upload File" creates an interface for file selection. The selected file is loaded into a server directory, after the submission of a form.

Definition

A field "Upload File" creates an interface for file selection. The selected file is loaded into a server directory, after the submission of a form.
Upload_file_Main_Image

Settings

upload_file_settings

Common Plugin Settings (Link to the article)

Construction

Folder

Write the name of the server directory in which the selected image is loaded. This name must be post-fixed with "/". For example, For example, "media/", "media/videos/", and so on.. For the rest of this description, consider "media/" directory as a value of the "folder" parameter.

Default Value

Optional, write the full path to the default file (directory + filename). It is applied at first when the form is loaded.
(Override) The default value of a field is overwritten by the value entered directly into the editing interface for a content type.

1 Folder / Content

Optional, select (Yes) to choose to load the selected file in a directory specific to an article. The name of this directory is: the value of the "folder" parameter + the identifier of the article created after the form submission. For example, if the created article is characterized by the identifier "124", then the selected file in the form ("file.txt" for example) is loaded into the directory "media/124/".

1 Folder / User

Optional, select (Yes) to choose to load the selected file in a directory specific to the user who performs this operation. The name of this directory is: the value of the "folder" parameter + the user "id". For example, if "user1" with identifier "64" load file "file.txt" then this image is saved in the directory "media/64/".
if the two previous settings "1 Folder / Content" and "1 Folder / User" are on (Yes) then the selected file is loaded in the directory: the value of the "folder" parameter + the identifier of the user + the identifier of the created article.

Legal Extensions

Write the authorized extensions of the files to load. By default, this parameter contains the value "doc, pdf, ppt, xls, zip, DOC, PDF, PPT, XLS, ZIP".

Maximum Size

Write the maximum size of the files to load. By default the value of this parameter is "5 MB" (5 megabytes)..
If no limits are required then write 0.

Show Preview

Optional, select an option to show or not an overview of the file in a form. This overview can be:
  • Option 1 (Hide): to have any overview,
  • Option 2 (Icon): an icon by default,
  • Option 3 (Title): the title of the file.
Preview_upload_file

Show Delete Checkbox

Optional, select (Yes) to allow the deletion of the loaded file when editing an article. This deletion is done by checking the checkbox.
delete_checkbox_upload_file
Please note, no warning message appears. Make sure you want to delete the file before you check the checkbox.

Show Custom Path

Optional, select (Yes) to change the file directory (designated by the parameter "folder") in the form.
show_path_upload_file
In order to show or to hide the input element of the custom path in the form, you should click on a lock.
Use this option if you want to change the path of some files loaded by this type of field, not all.

Size

Write the input size of this field.

Advanced Mode

Optional, select "Yes (JSON-formatted value)" to activate the setting "Show Title".

Show Title

Optional, select (Yes) to add a title to the link of the loaded file.
Show_title_upload_file
Modify the label of the input text (used to add a title to the file in a form) by changing the value "Link Title" on the right of drop down "Show Title".