- Name:
file
- UI: File picker button opens media gallery
- Data type: File path string
The file widget allows editors to upload a file or select an existing one from the media library. The path to the file will be saved to the field as a string.
Widget Options
For common options, see Common widget options.
Name 17398_684ca0-53> |
Type 17398_881c85-68> |
Default 17398_ddfd64-29> |
Description 17398_518a49-1b> |
---|---|---|---|
default 17398_d39dd5-9a> |
string 17398_4b2843-89> |
|
Optional. The default value for the field. Accepts a string. 17398_b3adae-2c> |
media_folder 17398_f8468b-f7> |
string 17398_951611-a3> | 17398_fcf8ba-b6> |
Optional. Specifies the folder path where uploaded files should be saved, relative to the base of the repo 17398_0fe992-40> |
public_folder 17398_bba4b5-c9> |
string 17398_830b8d-7d> | 17398_885dd9-7d> |
Optional. Specifies the folder path where the files uploaded by the media library will be accessed, relative to the base of the built site 17398_994b03-22> |
media_library 17398_5d5cfa-f7> |
Media Library Options 17398_9af343-e9> |
|
Optional. Media library settings to apply when the media library is opened by the current widget. See Media Library 17398_e371fa-f2> |
choose_url 17398_0fdc4f-25> |
boolean 17398_c50972-eb> |
|
Optional. When set to |
select_folder 17398_2a56fd-1e> |
boolean 17398_e5075b-70> |
|
Optional. When set to |
multiple 17398_5a08ac-13> |
boolean 17398_c2a9ba-63> |
|
Optional. When set to |
Examples
name: manual_pdf
label: Manual PDF
widget: file
default: /uploads/general-manual.pdf
name: 'manual_pdf',
label: 'Manual PDF',
widget: 'file',
default: '/uploads/general-manual.pdf',
name: gallery_folder
label: Gallery Folder
widget: file
select_folder: true
name: 'gallery_folder',
label: 'Gallery Folder',
widget: 'file',
select_folder: true,