Skip to content

Commit bffebcc

Browse files
committed
docs: describe options.createDirsFromUpload
1 parent 1acf4b1 commit bffebcc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ See it's defaults in [src/Formidable.js DEFAULT_OPTIONS](./src/Formidable.js)
340340
- `options.filter` **{function}** - default function that always returns true.
341341
Use it to filter files before they are uploaded. Must return a boolean.
342342

343+
- `options.createDirsFromUploads` **{boolean}** - default false. If true, makes direct folder uploads possible. Use `<input type="file" name="folders" webkitdirectory directory multiple>` to create a form to upload folders. Has to be used with the options `options.uploadDir` and `options.filename` where `options.filename` has to return a string with the character `/` for folders to be created. The base will be `options.uploadDir`.
344+
343345

344346
#### `options.filename` **{function}** function (name, ext, part, form) -> string
345347

0 commit comments

Comments
 (0)