- Description:
This key represents an array format for the
accepts_mime_typeskey that restricts which file types are available to select or upload in File Inputs.The value is an array of MIME type strings. Each string specifies a file type that CloudCannon will allow for this input.
Available MIME types include image formats (
image/x-icon,image/gif,image/jpeg,image/png,image/webp,image/bmp,image/svg+xml) and document formats (application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation).Use the array format when you want to explicitly list multiple MIME types, making it easier to read and maintain in your configuration.
- Appears in:
└── accepts_mime_types └── Array Accepts Mime Types- Type:
Array<accepts_mime_types(array)[*]>- Items:
This key represents an array format for the
accepts_mime_typeskey that restricts which file types are available to select or upload in File Inputs.The value is an array of MIME type strings. Each string specifies a file type that CloudCannon will allow for this input.
Available MIME types include image formats (
image/x-icon,image/gif,image/jpeg,image/png,image/webp,image/bmp,image/svg+xml) and document formats (application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation).Use the array format when you want to explicitly list multiple MIME types, making it easier to read and maintain in your configuration.
Allowed values:
x-world/x-3dmfapplication/x-authorware-binapplication/x-authorware-mapapplication/x-authorware-segtext/vnd.abcvideo/animaflexapplication/postscriptaudio/aiffaudio/x-aiffapplication/x-aimand 423 more.Show examplesHide examples
In this example, we have configured a File Input to accept only image files using an array of image MIME types.
Copied to clipboard_inputs: hero_image: type: file label: Hero Image options: accepts_mime_types: - image/jpeg - image/png - image/webp{ "_inputs": { "hero_image": { "type": "file", "label": "Hero Image", "options": { "accepts_mime_types": [ "image/jpeg", "image/png", "image/webp" ] } } } }In this example, we have configured a File Input to accept only document files using an array of document MIME types.
Copied to clipboard_inputs: document: type: file label: Document options: accepts_mime_types: - application/pdf - application/msword - >- application/vnd.openxmlformats-officedocument.wordprocessingml.document{ "_inputs": { "document": { "type": "file", "label": "Document", "options": { "accepts_mime_types": [ "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ] } } } }- Examples:
In this example, we have configured a File Input to accept only image files using an array of image MIME types.
Copied to clipboard_inputs: hero_image: type: file label: Hero Image options: accepts_mime_types: - image/jpeg - image/png - image/webp{ "_inputs": { "hero_image": { "type": "file", "label": "Hero Image", "options": { "accepts_mime_types": [ "image/jpeg", "image/png", "image/webp" ] } } } }In this example, we have configured a File Input to accept only document files using an array of document MIME types.
Copied to clipboard_inputs: document: type: file label: Document options: accepts_mime_types: - application/pdf - application/msword - >- application/vnd.openxmlformats-officedocument.wordprocessingml.document{ "_inputs": { "document": { "type": "file", "label": "Document", "options": { "accepts_mime_types": [ "application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ] } } } }