Skip to content

Commit

Permalink
add allowRemove option
Browse files Browse the repository at this point in the history
  • Loading branch information
rikschennink committed Aug 31, 2020
1 parent 52dbb1b commit 2aada1f
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog

## 4.20.1

- Add `allowRemove` option so it actually works.


## 4.20.0

- Add `allowRemove`, set to `false` to disable remove button.
Expand Down
2 changes: 1 addition & 1 deletion dist/filepond.css
@@ -1,5 +1,5 @@
/*!
* FilePond 4.20.0
* FilePond 4.20.1
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down
3 changes: 2 additions & 1 deletion dist/filepond.esm.js
@@ -1,5 +1,5 @@
/*!
* FilePond 4.20.0
* FilePond 4.20.1
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down Expand Up @@ -1890,6 +1890,7 @@ const defaultOptions = {
allowMultiple: [false, Type.BOOLEAN], // Allow multiple files (disabled by default, as multiple attribute is also required on input to allow multiple)
allowReplace: [true, Type.BOOLEAN], // Allow dropping a file on other file to replace it (only works when multiple is set to false)
allowRevert: [true, Type.BOOLEAN], // Allows user to revert file upload
allowRemove: [true, Type.BOOLEAN], // Allow user to remove a file
allowProcess: [true, Type.BOOLEAN], // Allows user to process a file, when set to false, this removes the file upload button
allowReorder: [false, Type.BOOLEAN], // Allow reordering of files
allowDirectoriesOnly: [false, Type.BOOLEAN], // Allow only selecting directories with browse (no support for filtering dnd at this point)
Expand Down
4 changes: 2 additions & 2 deletions dist/filepond.esm.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/filepond.js
@@ -1,5 +1,5 @@
/*!
* FilePond 4.20.0
* FilePond 4.20.1
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down Expand Up @@ -3924,6 +3924,7 @@
allowMultiple: [false, Type.BOOLEAN], // Allow multiple files (disabled by default, as multiple attribute is also required on input to allow multiple)
allowReplace: [true, Type.BOOLEAN], // Allow dropping a file on other file to replace it (only works when multiple is set to false)
allowRevert: [true, Type.BOOLEAN], // Allows user to revert file upload
allowRemove: [true, Type.BOOLEAN], // Allow user to remove a file
allowProcess: [true, Type.BOOLEAN], // Allows user to process a file, when set to false, this removes the file upload button
allowReorder: [false, Type.BOOLEAN], // Allow reordering of files
allowDirectoriesOnly: [false, Type.BOOLEAN], // Allow only selecting directories with browse (no support for filtering dnd at this point)
Expand Down
2 changes: 1 addition & 1 deletion dist/filepond.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/filepond.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion index.html
Expand Up @@ -33,7 +33,8 @@
// Create the FilePond instance
const pond = FilePond.create(inputElement, {
allowMultiple: true,
allowReorder: true
allowReorder: true,
allowRemove: false
});

// Easy console access for testing purposes
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "filepond",
"version": "4.20.0",
"version": "4.20.1",
"description": "FilePond, Where files go to stretch their bits.",
"license": "MIT",
"author": {
Expand Down
1 change: 1 addition & 0 deletions src/js/app/options.js
Expand Up @@ -56,6 +56,7 @@ export const defaultOptions = {
allowMultiple: [false, Type.BOOLEAN], // Allow multiple files (disabled by default, as multiple attribute is also required on input to allow multiple)
allowReplace: [true, Type.BOOLEAN], // Allow dropping a file on other file to replace it (only works when multiple is set to false)
allowRevert: [true, Type.BOOLEAN], // Allows user to revert file upload
allowRemove: [true, Type.BOOLEAN], // Allow user to remove a file
allowProcess: [true, Type.BOOLEAN], // Allows user to process a file, when set to false, this removes the file upload button
allowReorder: [false, Type.BOOLEAN], // Allow reordering of files
allowDirectoriesOnly: [false, Type.BOOLEAN], // Allow only selecting directories with browse (no support for filtering dnd at this point)
Expand Down

0 comments on commit 2aada1f

Please sign in to comment.