Skip to main content
Module

x/netlify_cms_config/mod.ts>File

Netlify CMS config generator
Latest
class File
extends Field<Options>
Re-export
import { File } from "https://deno.land/x/netlify_cms_config@v0.3.2/mod.ts";

Constructors

new
File(label: string, config?: Options)

Properties

widget: string

Methods

allowMultiple(allow_multiple?): this

When set to false, prevents multiple selection for any media library extension, but must be supported by the extension in use.

chooseUrl(choose_url?): this

When set to false, the "Insert from URL" button will be hidden

default(path: string): this

Accepts a file path string

mediaConfig(config: Record<string, unknown>): this

A configuration object that will be passed directly to the media library being used. Available options are determined by the library

mediaFolder(media_folder: string): this

File path where uploaded files will be saved specific to this control. Paths can be relative to a collection folder (e.g. files will add the file to a sub-folder in the collection folder) or absolute with reference to the base of the repo which needs to begin with / (e.g /static/files will save uploaded files to the static folder in a sub folder named files)

Static Properties

defaults: Options