| 872 | |
| 873 | // Removes all files that aren't currently processed from the list |
| 874 | removeAllFiles(cancelIfNecessary) { |
| 875 | // Create a copy of files since removeFile() changes the @files array. |
| 876 | if (cancelIfNecessary == null) { |
| 877 | cancelIfNecessary = false; |
| 878 | } |
| 879 | for (let file of this.files.slice()) { |
| 880 | if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { |
| 881 | this.removeFile(file); |
| 882 | } |
| 883 | } |
| 884 | return null; |
| 885 | } |
| 886 | |
| 887 | // Resizes an image before it gets sent to the server. This function is the default behavior of |
| 888 | // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with |