[file] – File

[file name="your_file"]

Field that allows to upload a file.

Attributes:

AttributeExamplesDescription
name*name="unique_field_name"The field name. Needs to be unique in the form.
Required.
minmin="1"
min="1kb"
min="1mb"
Minimum file size allowed.
Accepts: Number + suffix (kb, mb, gb & tb) or only number to define the size in bytes.
Optional.
maxmax="10"
max="10kb"
max="10mb"
Maximum file size allowed.
Accepts: Number + suffix (kb, mb, gb & tb) or only number to define the size in bytes.
Optional.
acceptaccept=".txt"
accept=".txt,image/jpeg"
accept=".txt,image/jpeg,video/*"
A comma-separated list of file types allowed.
Accepts: File extensiones (.pdf), MIME types (application/pdf) and wildcard MIME types (application/*, which means that all subtypes of that MIME type are allowed).
Optional.
capturecapture="user"
capture="environment"
For mobiles mainly, specifies which device should capture the media, for images, can be the user-facing camera (user) or the outward-facing camera (environment).
Accepts: user or environment.
Optional.
mediamedia="yes"
media="no"
Decides if file should be registered in the WordPress media. Recommended to leave it to yes to be able to access to the file details from the media library.
Accepts: yes or no.
Default: yes.
Optional.

This field also supports common HTML attributes, as well as label & description attributes.