diff --git a/src/js/app/actions.js b/src/js/app/actions.js index 3c5ce528..857e2dfd 100644 --- a/src/js/app/actions.js +++ b/src/js/app/actions.js @@ -880,8 +880,6 @@ export const actions = (dispatch, query, state) => ({ success(createItemAPI(item)); } - console.log('REMOVE_ITEM', options); - // if this is a local file and the server.remove function has been configured, send source there so dev can remove file from server const server = state.options.server; if (item.origin === FileOrigin.LOCAL && server && isFunction(server.remove)) { diff --git a/src/js/app/utils/createFileProcessorFunction.js b/src/js/app/utils/createFileProcessorFunction.js index 3158e93a..a33218ff 100644 --- a/src/js/app/utils/createFileProcessorFunction.js +++ b/src/js/app/utils/createFileProcessorFunction.js @@ -37,7 +37,7 @@ export const createFileProcessorFunction = (apiUrl, action, name, options) => (f if (isObject(metadata)) { formData.append(name, JSON.stringify(metadata)); } // Turn into an array of objects so no matter what the input, we can handle it the same way - (file instanceof Blob ? [{ name: null, file }] : file).forEach(item => { + [{ name: null, file }].forEach(item => { formData.append(name, item.file, item.name === null ? item.file.name : `${item.name}${item.file.name}`); }); diff --git a/src/js/app/utils/createItem.js b/src/js/app/utils/createItem.js index 2ca34e3c..129d02fa 100644 --- a/src/js/app/utils/createItem.js +++ b/src/js/app/utils/createItem.js @@ -99,7 +99,7 @@ export const createItem = (origin = null, serverFileReference = null, file = nul fire('load-init'); }); - // we'eve received a size indication, let's update the stub + // we've received a size indication, let's update the stub loader.on('meta', meta => { // set size of file stub @@ -226,7 +226,7 @@ export const createItem = (origin = null, serverFileReference = null, file = nul abortProcessingRequestComplete = null; // if no file loaded we'll wait for the load event - if (!(state.file instanceof Blob)) { + if (!isFile(state.file)) { api.on('load', () => { process(processor, onprocess); });