diff --git a/website/src/docs/uppy.md b/website/src/docs/uppy.md index 17d050514..57679ec32 100644 --- a/website/src/docs/uppy.md +++ b/website/src/docs/uppy.md @@ -15,10 +15,10 @@ const uppy = Uppy({ autoProceed: true, debug: false, restrictions: { - maxFileSize: false, - maxNumberOfFiles: false, - minNumberOfFiles: false, - allowedFileTypes: false + maxFileSize: null, + maxNumberOfFiles: null, + minNumberOfFiles: null, + allowedFileTypes: null }, meta: {}, onBeforeFileAdded: (currentFile, files) => currentFile, @@ -52,10 +52,15 @@ Optionally provide rules and conditions for which files can be selected. **Parameters** -- `maxFileSize` *number* -- `maxNumberOfFiles` *number* -- `minNumberOfFiles` *number* -- `allowedFileTypes` *array* of wildcards or exact mime types, like `image/*` +- `maxFileSize` *null | number* +- `maxNumberOfFiles` *null | number* +- `minNumberOfFiles` *null | number* +- `allowedFileTypes` *null | array* of wildcards `image/*`, exact mime types `image/jpeg`, or file extensions `.jpg`: `['image/*', '.jpg', '.jpeg', '.png', '.gif']` + +`maxNumberOfFiles` affects the number of files user is able to select via the system file dialog in UI plugins like `DragDrop`, `FileInput` and `Dashboard`: when set to `1` they will only be able to select a single file, otherwise, when `null` or other number, they will be able to select multiple files. + +`allowedFileTypes` array also gets passed to the system file dialog (see [`input[type=file]` accept](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Limiting_accepted_file_types)), so user will only be able to select images, for example. + ### `meta: {}`