Skip to content

Commit

Permalink
docs: describe options.createDirsFromUpload
Browse files Browse the repository at this point in the history
  • Loading branch information
GrosSacASac committed Jul 20, 2022
1 parent 1acf4b1 commit bffebcc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ See it's defaults in [src/Formidable.js DEFAULT_OPTIONS](./src/Formidable.js)
- `options.filter` **{function}** - default function that always returns true.
Use it to filter files before they are uploaded. Must return a boolean.

- `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`.


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

Expand Down

0 comments on commit bffebcc

Please sign in to comment.