Skip to content

Commit

Permalink
fix issue where processFiles would re-process local server files
Browse files Browse the repository at this point in the history
  • Loading branch information
rikschennink committed May 13, 2019
1 parent e075026 commit 607ecd0
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 27 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 4.4.6

- Fix issue where `processFiles` would re-process `local` server images.


## 4.4.5

- Fix issue where FilePond event loop would freeze when tab was inactive.
Expand Down
2 changes: 1 addition & 1 deletion dist/filepond.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* FilePond 4.4.5
* FilePond 4.4.6
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down
17 changes: 10 additions & 7 deletions dist/filepond.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* FilePond 4.4.5
* FilePond 4.4.6
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down Expand Up @@ -1739,6 +1739,12 @@ const ItemStatus = {
LOAD_ERROR: 8
};

const FileOrigin = {
INPUT: 1,
LIMBO: 2,
LOCAL: 3
};

const getNonNumeric = str => /[^0-9]+/.exec(str);

const getDecimalSeparator = () => getNonNumeric((1.1).toLocaleString())[0];
Expand Down Expand Up @@ -3083,12 +3089,6 @@ const createFileStub = source => {
};
};

const FileOrigin = {
INPUT: 1,
LIMBO: 2,
LOCAL: 3
};

const isFile = value =>
value instanceof File || (value instanceof Blob && value.name);

Expand Down Expand Up @@ -7998,6 +7998,9 @@ const createApp = (initialOptions = {}) => {
if (!queries.length) {
const files = getFiles().filter(
item =>
!(
item.status === ItemStatus.IDLE && item.origin === FileOrigin.LOCAL
) &&
item.status !== ItemStatus.PROCESSING &&
item.status !== ItemStatus.PROCESSING_COMPLETE &&
item.status !== ItemStatus.PROCESSING_REVERT_ERROR
Expand Down
4 changes: 2 additions & 2 deletions dist/filepond.esm.min.js

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions dist/filepond.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* FilePond 4.4.5
* FilePond 4.4.6
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down Expand Up @@ -2035,6 +2035,12 @@
LOAD_ERROR: 8
};

var FileOrigin = {
INPUT: 1,
LIMBO: 2,
LOCAL: 3
};

var getNonNumeric = function getNonNumeric(str) {
return /[^0-9]+/.exec(str);
};
Expand Down Expand Up @@ -3622,12 +3628,6 @@
};
};

var FileOrigin = {
INPUT: 1,
LIMBO: 2,
LOCAL: 3
};

var isFile = function isFile(value) {
return value instanceof File || (value instanceof Blob && value.name);
};
Expand Down Expand Up @@ -9155,6 +9155,10 @@
if (!queries.length) {
var files = getFiles().filter(function(item) {
return (
!(
item.status === ItemStatus.IDLE &&
item.origin === FileOrigin.LOCAL
) &&
item.status !== ItemStatus.PROCESSING &&
item.status !== ItemStatus.PROCESSING_COMPLETE &&
item.status !== ItemStatus.PROCESSING_REVERT_ERROR
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.

18 changes: 13 additions & 5 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filepond",
"version": "4.4.5",
"version": "4.4.6",
"description": "FilePond, Where files go to stretch their bits.",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"node-sass": "^4.11.0",
"postcss-cli": "^6.1.2",
"prettier": "^1.16.4",
"rollup": "^1.7.0",
"rollup": "^1.11.3",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-license": "^0.8.1",
Expand Down
2 changes: 2 additions & 0 deletions src/js/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { isNumber } from '../utils/isNumber';
import { createItemAPI } from './utils/createItemAPI';
import { removeReleasedItems } from './utils/removeReleasedItems';
import { ItemStatus } from './enum/ItemStatus';
import { FileOrigin } from './enum/FileOrigin';

// defaults
import { getOptions } from './options';
Expand Down Expand Up @@ -393,6 +394,7 @@ export const createApp = (initialOptions = {}) => {
const queries = Array.isArray(args[0]) ? args[0] : args;
if (!queries.length) {
const files = getFiles().filter(item =>
!(item.status === ItemStatus.IDLE && item.origin === FileOrigin.LOCAL) &&
item.status !== ItemStatus.PROCESSING &&
item.status !== ItemStatus.PROCESSING_COMPLETE &&
item.status !== ItemStatus.PROCESSING_REVERT_ERROR
Expand Down

0 comments on commit 607ecd0

Please sign in to comment.