You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feature: upload dir and keep dir structure
* docs: example upload dir and keep dir structure
* feat: switch to async
* feat: use pause and resume to await directory before file
* feat: handle cases when directoryName is already an existing file
* docs: describe options.createDirsFromUpload
* fix: async await
* fix: formatting #855 (comment)
* tests: adapt tests
* fix: too many tests us this port at the same time
* tests: update sha1 (added linebreak)
* test: update special chars
we decode # encoded things now ?
* test: force carriage return and use fetch
* test: force async,
* test: remove unused
* test: move, use node for tests in test-node
* test: try to fix jest error
* test: update and fix custom plugin fail
* test: disable this test, cannot understand the error
ReferenceError: require is not defined
8 | size: 1024,
9 | filepath: '/tmp/cat.png',
> 10 | name: 'cat.png',
| ^
11 | type: 'image/png',
12 | lastModifiedDate: now,
13 | originalFilename: 'cat.png',
at _getJestObj (test/unit/persistent-file.test.js:10:7)
at test/unit/persistent-file.test.js:19:1
* test: detect problematic test case, comment out (todo)
* test: add test case for createDirsFromUploads option
* test: semicolons and others
* chore: version and changelog
* feat: test command runs all tests at once
* chore: update node version for testing
* chore: up dependencies like in v2
9afd5f8
* chore: mark as latest on npm
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,14 +77,14 @@ already be included. Check the examples below and the [examples/](https://github
77
77
78
78
```
79
79
# v2
80
-
npm install formidable
81
80
npm install formidable@v2
82
81
83
82
# v3
83
+
npm install formidable
84
84
npm install formidable@v3
85
85
```
86
86
87
-
_**Note:**In the near future v3 will be published on the `latest` NPM dist-tag. Future not ready releases will be published on `*-next` dist-tags for the corresponding version._
87
+
_**Note:** Future not ready releases will be published on `*-next` dist-tags for the corresponding version._
88
88
89
89
90
90
## Examples
@@ -344,6 +344,8 @@ See it's defaults in [src/Formidable.js DEFAULT_OPTIONS](./src/Formidable.js)
344
344
-`options.filter`**{function}** - default function that always returns true.
345
345
Use it to filter files before they are uploaded. Must return a boolean.
346
346
347
+
-`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`.
348
+
347
349
348
350
#### `options.filename`**{function}** function (name, ext, part, form) -> string
0 commit comments