new version 5.16.1 of fineuploader

This commit is contained in:
Uwe Steinmann 2020-05-07 07:06:54 +02:00
parent d6ff82ccb8
commit cd075863e9
23 changed files with 1321 additions and 518 deletions

View File

@ -1,5 +1,7 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2010-2012, Andrew Valums
Copyright (c) 2012-2013, Andrew Valums and Raymond S. Nicholus, III
Copyright (c) 2013-present, Widen Enterprises, Inc. Copyright (c) 2013-present, Widen Enterprises, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -1,4 +1,4 @@
// Fine Uploader 5.12.0 - (c) 2013-present Widen Enterprises, Inc. MIT licensed. http://fineuploader.com // Fine Uploader 5.16.2 - MIT licensed. http://fineuploader.com
(function(global) { (function(global) {
var qq = function(element) { var qq = function(element) {
"use strict"; "use strict";
@ -578,7 +578,7 @@
global.qq = qq; global.qq = qq;
} }
})(); })();
qq.version = "5.12.0"; qq.version = "5.16.2";
qq.supportedFeatures = function() { qq.supportedFeatures = function() {
"use strict"; "use strict";
var supportsUploading, supportsUploadingBlobs, supportsFileDrop, supportsAjaxFileUploading, supportsFolderDrop, supportsChunking, supportsResume, supportsUploadViaPaste, supportsUploadCors, supportsDeleteFileXdr, supportsDeleteFileCorsXhr, supportsDeleteFileCors, supportsFolderSelection, supportsImagePreviews, supportsUploadProgress; var supportsUploading, supportsUploadingBlobs, supportsFileDrop, supportsAjaxFileUploading, supportsFolderDrop, supportsChunking, supportsResume, supportsUploadViaPaste, supportsUploadCors, supportsDeleteFileXdr, supportsDeleteFileCorsXhr, supportsDeleteFileCors, supportsFolderSelection, supportsImagePreviews, supportsUploadProgress;
@ -596,9 +596,6 @@
} }
return supported; return supported;
} }
function isChrome21OrHigher() {
return (qq.chrome() || qq.opera()) && navigator.userAgent.match(/Chrome\/[2][1-9]|Chrome\/[3-9][0-9]/) !== undefined;
}
function isChrome14OrHigher() { function isChrome14OrHigher() {
return (qq.chrome() || qq.opera()) && navigator.userAgent.match(/Chrome\/[1][4-9]|Chrome\/[2-9][0-9]/) !== undefined; return (qq.chrome() || qq.opera()) && navigator.userAgent.match(/Chrome\/[1][4-9]|Chrome\/[2-9][0-9]/) !== undefined;
} }
@ -636,7 +633,11 @@
supportsAjaxFileUploading = supportsUploading && qq.isXhrUploadSupported(); supportsAjaxFileUploading = supportsUploading && qq.isXhrUploadSupported();
supportsUploadingBlobs = supportsAjaxFileUploading && !qq.androidStock(); supportsUploadingBlobs = supportsAjaxFileUploading && !qq.androidStock();
supportsFileDrop = supportsAjaxFileUploading && isDragAndDropSupported(); supportsFileDrop = supportsAjaxFileUploading && isDragAndDropSupported();
supportsFolderDrop = supportsFileDrop && isChrome21OrHigher(); supportsFolderDrop = supportsFileDrop && function() {
var input = document.createElement("input");
input.type = "file";
return !!("webkitdirectory" in (input || document.querySelectorAll("input[type=file]")[0]));
}();
supportsChunking = supportsAjaxFileUploading && qq.isFileChunkingSupported(); supportsChunking = supportsAjaxFileUploading && qq.isFileChunkingSupported();
supportsResume = supportsAjaxFileUploading && supportsChunking && isLocalStorageSupported(); supportsResume = supportsAjaxFileUploading && supportsChunking && isLocalStorageSupported();
supportsUploadViaPaste = supportsAjaxFileUploading && isChrome14OrHigher(); supportsUploadViaPaste = supportsAjaxFileUploading && isChrome14OrHigher();
@ -765,12 +766,7 @@
var parseEntryPromise = new qq.Promise(); var parseEntryPromise = new qq.Promise();
if (entry.isFile) { if (entry.isFile) {
entry.file(function(file) { entry.file(function(file) {
var name = entry.name, fullPath = entry.fullPath, indexOfNameInFullPath = fullPath.indexOf(name); file.qqPath = extractDirectoryPath(entry);
fullPath = fullPath.substr(0, indexOfNameInFullPath);
if (fullPath.charAt(0) === "/") {
fullPath = fullPath.substr(1);
}
file.qqPath = fullPath;
droppedFiles.push(file); droppedFiles.push(file);
parseEntryPromise.success(); parseEntryPromise.success();
}, function(fileError) { }, function(fileError) {
@ -798,6 +794,14 @@
} }
return parseEntryPromise; return parseEntryPromise;
} }
function extractDirectoryPath(entry) {
var name = entry.name, fullPath = entry.fullPath, indexOfNameInFullPath = fullPath.lastIndexOf(name);
fullPath = fullPath.substr(0, indexOfNameInFullPath);
if (fullPath.charAt(0) === "/") {
fullPath = fullPath.substr(1);
}
return fullPath;
}
function getFilesInDirectory(entry, reader, accumEntries, existingPromise) { function getFilesInDirectory(entry, reader, accumEntries, existingPromise) {
var promise = existingPromise || new qq.Promise(), dirReader = reader || entry.createReader(); var promise = existingPromise || new qq.Promise(), dirReader = reader || entry.createReader();
dirReader.readEntries(function readSuccess(entries) { dirReader.readEntries(function readSuccess(entries) {
@ -885,9 +889,6 @@
return fileDrag; return fileDrag;
} }
function leavingDocumentOut(e) { function leavingDocumentOut(e) {
if (qq.firefox()) {
return !e.relatedTarget;
}
if (qq.safari()) { if (qq.safari()) {
return e.x < 0 || e.y < 0; return e.x < 0 || e.y < 0;
} }
@ -927,8 +928,10 @@
maybeHideDropZones(); maybeHideDropZones();
}); });
disposeSupport.attach(document, "drop", function(e) { disposeSupport.attach(document, "drop", function(e) {
if (isFileDrag(e)) {
e.preventDefault(); e.preventDefault();
maybeHideDropZones(); maybeHideDropZones();
}
}); });
disposeSupport.attach(document, HIDE_ZONES_EVENT_NAME, maybeHideDropZones); disposeSupport.attach(document, HIDE_ZONES_EVENT_NAME, maybeHideDropZones);
} }
@ -953,6 +956,8 @@
}); });
} }
}); });
this._testing = {};
this._testing.extractDirectoryPath = extractDirectoryPath;
}; };
qq.DragAndDrop.callbacks = function() { qq.DragAndDrop.callbacks = function() {
"use strict"; "use strict";
@ -1005,7 +1010,7 @@
} }
var effectTest, dt = e.dataTransfer, isSafari = qq.safari(); var effectTest, dt = e.dataTransfer, isSafari = qq.safari();
effectTest = qq.ie() && qq.supportedFeatures.fileDrop ? true : dt.effectAllowed !== "none"; effectTest = qq.ie() && qq.supportedFeatures.fileDrop ? true : dt.effectAllowed !== "none";
return dt && effectTest && (dt.files || !isSafari && dt.types.contains && dt.types.contains("Files")); return dt && effectTest && (dt.files && dt.files.length || !isSafari && dt.types.contains && dt.types.contains("Files") || dt.types.includes && dt.types.includes("Files"));
} }
function isOrSetDropDisabled(isDisabled) { function isOrSetDropDisabled(isDisabled) {
if (isDisabled !== undefined) { if (isDisabled !== undefined) {
@ -1088,6 +1093,8 @@
return element; return element;
} }
}); });
this._testing = {};
this._testing.isValidFileDrag = isValidFileDrag;
}; };
})(window); })(window);
//# sourceMappingURL=dnd.js.map //# sourceMappingURL=dnd.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"sources":["_build/fine-uploader-gallery.css"],"names":[],"mappings":"AAOA,oBAEI,MAAO,MACP,YACA,QAAS,EACT,OAAQ,EACR,WAAY,KAKhB,8BACI,QAAS,OACT,MAAO,MACP,QAAS,IAAI,KACb,MAAO,KACP,WAAY,OACZ,WAAY,QACZ,MAAO,KACP,cAAe,IACf,OAAQ,IAAI,MAAM,QAClB,WAAY,EAAE,IAAI,IAAI,sBAA0B,MAAO,IAAI,EAAE,IAAI,sBAA0B,MAAO,EAAE,IAAI,EAAE,gBAAqB,EAAE,KAAK,KAAK,gBAAoB,MAEnK,oCACI,WAAY,QAEhB,oCACI,QAAoB,KAAP,OAAJ,IAMb,wBACI,SAAU,SACV,WAAY,MACZ,WAAY,MACZ,WAAY,OACZ,MAAO,QACP,cAAe,IACf,OAAQ,IAAI,OAAO,KACnB,iBAAkB,QAClB,QAAS,KAEb,+BACI,QAAS,wBAAwB,IACjC,SAAU,SACV,UAAW,KACX,KAAM,EACN,MAAO,KACP,WAAY,OACZ,IAAK,IACL,QAAS,IACT,OAAQ,kBAEZ,iCAAkC,2BAC9B,SAAU,SACV,IAAK,EACL,KAAM,EACN,MAAO,KACP,OAAQ,KACR,WAAY,KACZ,QAAS,EACT,WAAY,QACZ,cAAe,IACf,WAAY,OAEhB,sCACI,QAAS,MACT,SAAU,SACV,IAAK,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,UAAW,KACX,MAAO,QACP,cAAe,IACf,aAAc,EACd,QAAS,aAGb,mCACI,SAAU,SACV,QAAS,EAET,QAAS,GAIb,wCACI,OAAQ,QACR,aAAc,KAGlB,+CACI,QAAS,aACT,OAAQ,QACR,SAAU,SACV,MAAO,EACP,IAAK,EAGT,8CACI,SAAU,OACV,OAAQ,KACR,MAAO,KACP,MAAO,eACP,QAAS,EAAE,IACX,cAAe,IACf,OAAQ,IAAI,MAAM,KAClB,cAAe,IACf,UAAW,KAEX,QAAS,EAKb,mCACI,QAAS,KACT,WAAY,cACZ,MAAO,KACP,OAAQ,KACR,eAAgB,YAEpB,4BACI,WAAY,eACZ,MAAO,KACP,OAAQ,KACR,eAAgB,IAChB,QAAS,aAEb,2BACI,WAAY,eACZ,MAAO,KACP,OAAQ,KACR,eAAgB,IAChB,QAAS,aACT,MAAO,KAEX,8BACI,WAAY,kBACZ,MAAO,KACP,OAAQ,KACR,eAAgB,IAChB,QAAS,aAEb,2BACI,WAAY,eACZ,MAAO,KACP,OAAQ,KACR,eAAgB,IAChB,QAAS,aAGb,qBACI,QAAS,KAMb,kDACI,4DACA,QAAS,GAGb,kCACI,SAAU,OACV,SAAU,SAGV,OAAQ,MACR,MAAO,MAEX,mCACI,cAAe,IAAI,IAAI,EAAE,EACzB,OAAQ,EAGR,IAAK,EAGL,OAAO,KACP,QAAS,MAIb,2CAEI,SAAU,SACV,IAAK,IACL,UAAW,iBACX,eAAgB,iBAChB,cAAe,iBACf,kBAAmB,iBAIvB,+BACI,QAAS,KAGb,qCACI,QAAS,MAGb,+BACI,QAAS,KAGb,qCACI,QAAS,MAGb,kDACI,WAAY,OACZ,YAAa,KAGjB,yDACI,YAAa,IACb,aAAc,IAGlB,2DACI,eAAgB,KAGpB,0CACI,iBAAkB"}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"sources":["_build/fine-uploader-new.css"],"names":[],"mappings":"AAMA,QAkDA,kBAWI,WAAY,EAAE,IAAI,IAAI,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QAAS,KAGb,0BACI,QAAS,MAGb,uCACI,WAAY,OACZ,YAAa,KAGjB,8CACI,YAAa,IACb,aAAc,IAGlB,gDACI,eAAgB,KAGpB,8BACI,iBAAkB"}

View File

@ -1,4 +1,4 @@
// Fine Uploader 5.12.0 - (c) 2013-present Widen Enterprises, Inc. MIT licensed. http://fineuploader.com // Fine Uploader 5.16.2 - MIT licensed. http://fineuploader.com
(function(global) { (function(global) {
var qq = function(element) { var qq = function(element) {
"use strict"; "use strict";
@ -585,7 +585,7 @@
}; };
qq.Error.prototype = new Error(); qq.Error.prototype = new Error();
})(); })();
qq.version = "5.12.0"; qq.version = "5.16.2";
qq.supportedFeatures = function() { qq.supportedFeatures = function() {
"use strict"; "use strict";
var supportsUploading, supportsUploadingBlobs, supportsFileDrop, supportsAjaxFileUploading, supportsFolderDrop, supportsChunking, supportsResume, supportsUploadViaPaste, supportsUploadCors, supportsDeleteFileXdr, supportsDeleteFileCorsXhr, supportsDeleteFileCors, supportsFolderSelection, supportsImagePreviews, supportsUploadProgress; var supportsUploading, supportsUploadingBlobs, supportsFileDrop, supportsAjaxFileUploading, supportsFolderDrop, supportsChunking, supportsResume, supportsUploadViaPaste, supportsUploadCors, supportsDeleteFileXdr, supportsDeleteFileCorsXhr, supportsDeleteFileCors, supportsFolderSelection, supportsImagePreviews, supportsUploadProgress;
@ -603,9 +603,6 @@
} }
return supported; return supported;
} }
function isChrome21OrHigher() {
return (qq.chrome() || qq.opera()) && navigator.userAgent.match(/Chrome\/[2][1-9]|Chrome\/[3-9][0-9]/) !== undefined;
}
function isChrome14OrHigher() { function isChrome14OrHigher() {
return (qq.chrome() || qq.opera()) && navigator.userAgent.match(/Chrome\/[1][4-9]|Chrome\/[2-9][0-9]/) !== undefined; return (qq.chrome() || qq.opera()) && navigator.userAgent.match(/Chrome\/[1][4-9]|Chrome\/[2-9][0-9]/) !== undefined;
} }
@ -643,7 +640,11 @@
supportsAjaxFileUploading = supportsUploading && qq.isXhrUploadSupported(); supportsAjaxFileUploading = supportsUploading && qq.isXhrUploadSupported();
supportsUploadingBlobs = supportsAjaxFileUploading && !qq.androidStock(); supportsUploadingBlobs = supportsAjaxFileUploading && !qq.androidStock();
supportsFileDrop = supportsAjaxFileUploading && isDragAndDropSupported(); supportsFileDrop = supportsAjaxFileUploading && isDragAndDropSupported();
supportsFolderDrop = supportsFileDrop && isChrome21OrHigher(); supportsFolderDrop = supportsFileDrop && function() {
var input = document.createElement("input");
input.type = "file";
return !!("webkitdirectory" in (input || document.querySelectorAll("input[type=file]")[0]));
}();
supportsChunking = supportsAjaxFileUploading && qq.isFileChunkingSupported(); supportsChunking = supportsAjaxFileUploading && qq.isFileChunkingSupported();
supportsResume = supportsAjaxFileUploading && supportsChunking && isLocalStorageSupported(); supportsResume = supportsAjaxFileUploading && supportsChunking && isLocalStorageSupported();
supportsUploadViaPaste = supportsAjaxFileUploading && isChrome14OrHigher(); supportsUploadViaPaste = supportsAjaxFileUploading && isChrome14OrHigher();
@ -903,7 +904,8 @@
originalName: spec.name, originalName: spec.name,
uuid: spec.uuid, uuid: spec.uuid,
size: spec.size == null ? -1 : spec.size, size: spec.size == null ? -1 : spec.size,
status: status status: status,
file: spec.file
}) - 1; }) - 1;
if (spec.batchId) { if (spec.batchId) {
data[id].batchId = spec.batchId; data[id].batchId = spec.batchId;
@ -925,6 +927,7 @@
byStatus[status] = []; byStatus[status] = [];
} }
byStatus[status].push(id); byStatus[status].push(id);
spec.onBeforeStatusChange && spec.onBeforeStatusChange(id);
uploaderProxy.onStatusChange(id, null, status); uploaderProxy.onStatusChange(id, null, status);
return id; return id;
}, },
@ -941,6 +944,12 @@
return qq.extend([], data, true); return qq.extend([], data, true);
} }
}, },
removeFileRef: function(id) {
var record = getDataByIds(id);
if (record) {
delete record.file;
}
},
reset: function() { reset: function() {
data = []; data = [];
byUuid = {}; byUuid = {};
@ -993,6 +1002,7 @@
CANCELED: "canceled", CANCELED: "canceled",
PAUSED: "paused", PAUSED: "paused",
UPLOADING: "uploading", UPLOADING: "uploading",
UPLOAD_FINALIZING: "upload finalizing",
UPLOAD_RETRYING: "retrying upload", UPLOAD_RETRYING: "retrying upload",
UPLOAD_SUCCESSFUL: "upload successful", UPLOAD_SUCCESSFUL: "upload successful",
UPLOAD_FAILED: "upload failed", UPLOAD_FAILED: "upload failed",
@ -1073,7 +1083,14 @@
} }
}, },
cancel: function(id) { cancel: function(id) {
var uploadData = this._uploadData.retrieve({
id: id
});
if (uploadData && uploadData.status === qq.status.UPLOAD_FINALIZING) {
this.log(qq.format("Ignoring cancel for file ID {} ({}). Finalizing upload.", id, this.getName(id)), "error");
} else {
this._handler.cancel(id); this._handler.cancel(id);
}
}, },
cancelAll: function() { cancelAll: function() {
var storedIdsCopy = [], self = this; var storedIdsCopy = [], self = this;
@ -1150,7 +1167,17 @@
return this._endpointStore.get(fileId); return this._endpointStore.get(fileId);
}, },
getFile: function(fileOrBlobId) { getFile: function(fileOrBlobId) {
return this._handler.getFile(fileOrBlobId) || null; var file = this._handler.getFile(fileOrBlobId);
var uploadDataRecord;
if (!file) {
uploadDataRecord = this._uploadData.retrieve({
id: fileOrBlobId
});
if (uploadDataRecord) {
file = uploadDataRecord.file;
}
}
return file || null;
}, },
getInProgress: function() { getInProgress: function() {
return this._uploadData.retrieve({ return this._uploadData.retrieve({
@ -1199,6 +1226,9 @@
id: id id: id
}).uuid; }).uuid;
}, },
isResumable: function(id) {
return this._handler.hasResumeRecord(id);
},
log: function(str, level) { log: function(str, level) {
if (this._options.debug && (!level || level === "info")) { if (this._options.debug && (!level || level === "info")) {
qq.log("[Fine Uploader " + qq.version + "] " + str); qq.log("[Fine Uploader " + qq.version + "] " + str);
@ -1225,6 +1255,10 @@
} }
return false; return false;
}, },
removeFileRef: function(id) {
this._handler.expunge(id);
this._uploadData.removeFileRef(id);
},
reset: function() { reset: function() {
this.log("Resetting uploader..."); this.log("Resetting uploader...");
this._handler.reset(); this._handler.reset();
@ -1247,6 +1281,7 @@
this._succeededSinceLastAllComplete = []; this._succeededSinceLastAllComplete = [];
this._failedSinceLastAllComplete = []; this._failedSinceLastAllComplete = [];
this._totalProgress && this._totalProgress.reset(); this._totalProgress && this._totalProgress.reset();
this._customResumeDataStore.reset();
}, },
retry: function(id) { retry: function(id) {
return this._manualRetry(id); return this._manualRetry(id);
@ -1262,6 +1297,9 @@
setCustomHeaders: function(headers, id) { setCustomHeaders: function(headers, id) {
this._customHeadersStore.set(headers, id); this._customHeadersStore.set(headers, id);
}, },
setCustomResumeData: function(id, data) {
this._customResumeDataStore.set(data, id);
},
setDeleteFileCustomHeaders: function(headers, id) { setDeleteFileCustomHeaders: function(headers, id) {
this._deleteFileCustomHeadersStore.set(headers, id); this._deleteFileCustomHeadersStore.set(headers, id);
}, },
@ -1289,6 +1327,28 @@
setUuid: function(id, newUuid) { setUuid: function(id, newUuid) {
return this._uploadData.uuidChanged(id, newUuid); return this._uploadData.uuidChanged(id, newUuid);
}, },
setStatus: function(id, newStatus) {
var fileRecord = this.getUploads({
id: id
});
if (!fileRecord) {
throw new qq.Error(id + " is not a valid file ID.");
}
switch (newStatus) {
case qq.status.DELETED:
this._onDeleteComplete(id, null, false);
break;
case qq.status.DELETE_FAILED:
this._onDeleteComplete(id, null, true);
break;
default:
var errorMessage = "Method setStatus called on '" + name + "' not implemented yet for " + newStatus;
this.log(errorMessage);
throw new qq.Error(errorMessage);
}
},
uploadStoredFiles: function() { uploadStoredFiles: function() {
if (this._storedIds.length === 0) { if (this._storedIds.length === 0) {
this._itemError("noFilesError"); this._itemError("noFilesError");
@ -1299,20 +1359,22 @@
}; };
qq.basePrivateApi = { qq.basePrivateApi = {
_addCannedFile: function(sessionData) { _addCannedFile: function(sessionData) {
var id = this._uploadData.addFile({ var self = this;
return this._uploadData.addFile({
uuid: sessionData.uuid, uuid: sessionData.uuid,
name: sessionData.name, name: sessionData.name,
size: sessionData.size, size: sessionData.size,
status: qq.status.UPLOAD_SUCCESSFUL status: qq.status.UPLOAD_SUCCESSFUL,
}); onBeforeStatusChange: function(id) {
sessionData.deleteFileEndpoint && this.setDeleteFileEndpoint(sessionData.deleteFileEndpoint, id); sessionData.deleteFileEndpoint && self.setDeleteFileEndpoint(sessionData.deleteFileEndpoint, id);
sessionData.deleteFileParams && this.setDeleteFileParams(sessionData.deleteFileParams, id); sessionData.deleteFileParams && self.setDeleteFileParams(sessionData.deleteFileParams, id);
if (sessionData.thumbnailUrl) { if (sessionData.thumbnailUrl) {
this._thumbnailUrls[id] = sessionData.thumbnailUrl; self._thumbnailUrls[id] = sessionData.thumbnailUrl;
} }
this._netUploaded++; self._netUploaded++;
this._netUploadedOrQueued++; self._netUploadedOrQueued++;
return id; }
});
}, },
_annotateWithButtonId: function(file, associatedInput) { _annotateWithButtonId: function(file, associatedInput) {
if (qq.isFile(file)) { if (qq.isFile(file)) {
@ -1547,17 +1609,28 @@
onUploadPrep: qq.bind(this._onUploadPrep, this), onUploadPrep: qq.bind(this._onUploadPrep, this),
onUpload: function(id, name) { onUpload: function(id, name) {
self._onUpload(id, name); self._onUpload(id, name);
self._options.callbacks.onUpload(id, name); var onUploadResult = self._options.callbacks.onUpload(id, name);
if (qq.isGenericPromise(onUploadResult)) {
self.log(qq.format("onUpload for {} returned a Promise - waiting for resolution.", id));
return onUploadResult;
}
return new qq.Promise().success();
}, },
onUploadChunk: function(id, name, chunkData) { onUploadChunk: function(id, name, chunkData) {
self._onUploadChunk(id, chunkData); self._onUploadChunk(id, chunkData);
self._options.callbacks.onUploadChunk(id, name, chunkData); var onUploadChunkResult = self._options.callbacks.onUploadChunk(id, name, chunkData);
if (qq.isGenericPromise(onUploadChunkResult)) {
self.log(qq.format("onUploadChunk for {}.{} returned a Promise - waiting for resolution.", id, chunkData.partIndex));
return onUploadChunkResult;
}
return new qq.Promise().success();
}, },
onUploadChunkSuccess: function(id, chunkData, result, xhr) { onUploadChunkSuccess: function(id, chunkData, result, xhr) {
self._onUploadChunkSuccess(id, chunkData);
self._options.callbacks.onUploadChunkSuccess.apply(self, arguments); self._options.callbacks.onUploadChunkSuccess.apply(self, arguments);
}, },
onResume: function(id, name, chunkData) { onResume: function(id, name, chunkData, customResumeData) {
return self._options.callbacks.onResume(id, name, chunkData); return self._options.callbacks.onResume(id, name, chunkData, customResumeData);
}, },
onAutoRetry: function(id, name, responseJSON, xhr) { onAutoRetry: function(id, name, responseJSON, xhr) {
return self._onAutoRetry.apply(self, arguments); return self._onAutoRetry.apply(self, arguments);
@ -1582,7 +1655,16 @@
return status === qq.status.QUEUED || status === qq.status.SUBMITTED || status === qq.status.UPLOAD_RETRYING || status === qq.status.PAUSED; return status === qq.status.QUEUED || status === qq.status.SUBMITTED || status === qq.status.UPLOAD_RETRYING || status === qq.status.PAUSED;
}, },
getIdsInProxyGroup: self._uploadData.getIdsInProxyGroup, getIdsInProxyGroup: self._uploadData.getIdsInProxyGroup,
getIdsInBatch: self._uploadData.getIdsInBatch getIdsInBatch: self._uploadData.getIdsInBatch,
isInProgress: function(id) {
return self.getUploads({
id: id
}).status === qq.status.UPLOADING;
},
getCustomResumeData: qq.bind(self._getCustomResumeData, self),
setStatus: function(id, status) {
self._uploadData.setStatus(id, status);
}
}; };
qq.each(this._options.request, function(prop, val) { qq.each(this._options.request, function(prop, val) {
options[prop] = val; options[prop] = val;
@ -1659,6 +1741,9 @@
} }
} }
}, },
_getCustomResumeData: function(fileId) {
return this._customResumeDataStore.get(fileId);
},
_getNotFinished: function() { _getNotFinished: function() {
return this._uploadData.retrieve({ return this._uploadData.retrieve({
status: [ qq.status.UPLOADING, qq.status.UPLOAD_RETRYING, qq.status.QUEUED, qq.status.SUBMITTING, qq.status.SUBMITTED, qq.status.PAUSED ] status: [ qq.status.UPLOADING, qq.status.UPLOAD_RETRYING, qq.status.QUEUED, qq.status.SUBMITTING, qq.status.SUBMITTED, qq.status.PAUSED ]
@ -1760,7 +1845,8 @@
uuid: uuid, uuid: uuid,
name: name, name: name,
size: size, size: size,
batchId: batchId batchId: batchId,
file: file
}); });
this._handler.add(id, file); this._handler.add(id, file);
this._trackButton(id); this._trackButton(id);
@ -1781,6 +1867,28 @@
blob: blob blob: blob
}); });
}, },
_handleDeleteSuccess: function(id) {
if (this.getUploads({
id: id
}).status !== qq.status.DELETED) {
var name = this.getName(id);
this._netUploadedOrQueued--;
this._netUploaded--;
this._handler.expunge(id);
this._uploadData.setStatus(id, qq.status.DELETED);
this.log("Delete request for '" + name + "' has succeeded.");
}
},
_handleDeleteFailed: function(id, xhrOrXdr) {
var name = this.getName(id);
this._uploadData.setStatus(id, qq.status.DELETE_FAILED);
this.log("Delete request for '" + name + "' has failed.", "error");
if (!xhrOrXdr || xhrOrXdr.withCredentials === undefined) {
this._options.callbacks.onError(id, name, "Delete request failed", xhrOrXdr);
} else {
this._options.callbacks.onError(id, name, "Delete request failed with response code " + xhrOrXdr.status, xhrOrXdr);
}
},
_initExtraButton: function(spec) { _initExtraButton: function(spec) {
var button = this._createUploadButton({ var button = this._createUploadButton({
accept: spec.validation.acceptFiles, accept: spec.validation.acceptFiles,
@ -1933,7 +2041,7 @@
_onAutoRetry: function(id, name, responseJSON, xhr, callback) { _onAutoRetry: function(id, name, responseJSON, xhr, callback) {
var self = this; var self = this;
self._preventRetries[id] = responseJSON[self._options.retry.preventRetryResponseProperty]; self._preventRetries[id] = responseJSON[self._options.retry.preventRetryResponseProperty];
if (self._shouldAutoRetry(id, name, responseJSON)) { if (self._shouldAutoRetry(id)) {
var retryWaitPeriod = self._options.retry.autoAttemptDelay * 1e3; var retryWaitPeriod = self._options.retry.autoAttemptDelay * 1e3;
self._maybeParseAndSendUploadError.apply(self, arguments); self._maybeParseAndSendUploadError.apply(self, arguments);
self._options.callbacks.onAutoRetry(id, name, self._autoRetries[id]); self._options.callbacks.onAutoRetry(id, name, self._autoRetries[id]);
@ -2006,19 +2114,9 @@
_onDeleteComplete: function(id, xhrOrXdr, isError) { _onDeleteComplete: function(id, xhrOrXdr, isError) {
var name = this.getName(id); var name = this.getName(id);
if (isError) { if (isError) {
this._uploadData.setStatus(id, qq.status.DELETE_FAILED); this._handleDeleteFailed(id, xhrOrXdr);
this.log("Delete request for '" + name + "' has failed.", "error");
if (xhrOrXdr.withCredentials === undefined) {
this._options.callbacks.onError(id, name, "Delete request failed", xhrOrXdr);
} else { } else {
this._options.callbacks.onError(id, name, "Delete request failed with response code " + xhrOrXdr.status, xhrOrXdr); this._handleDeleteSuccess(id);
}
} else {
this._netUploadedOrQueued--;
this._netUploaded--;
this._handler.expunge(id);
this._uploadData.setStatus(id, qq.status.DELETED);
this.log("Delete request for '" + name + "' has succeeded.");
} }
}, },
_onInputChange: function(input) { _onInputChange: function(input) {
@ -2078,6 +2176,11 @@
this._uploadData.setStatus(id, qq.status.UPLOADING); this._uploadData.setStatus(id, qq.status.UPLOADING);
}, },
_onUploadChunk: function(id, chunkData) {}, _onUploadChunk: function(id, chunkData) {},
_onUploadChunkSuccess: function(id, chunkData) {
if (!this._preventRetries[id] && this._options.retry.enableAuto) {
this._autoRetries[id] = 0;
}
},
_onUploadStatusChange: function(id, oldStatus, newStatus) { _onUploadStatusChange: function(id, oldStatus, newStatus) {
if (newStatus === qq.status.PAUSED) { if (newStatus === qq.status.PAUSED) {
clearTimeout(this._retryTimeouts[id]); clearTimeout(this._retryTimeouts[id]);
@ -2173,7 +2276,7 @@
this._uploadData.updateSize(id, newSize); this._uploadData.updateSize(id, newSize);
this._totalProgress && this._totalProgress.onNewSize(id); this._totalProgress && this._totalProgress.onNewSize(id);
}, },
_shouldAutoRetry: function(id, name, responseJSON) { _shouldAutoRetry: function(id) {
var uploadData = this._uploadData.retrieve({ var uploadData = this._uploadData.retrieve({
id: id id: id
}); });
@ -2322,6 +2425,7 @@
maxConnections: 3, maxConnections: 3,
disableCancelForFormUploads: false, disableCancelForFormUploads: false,
autoUpload: true, autoUpload: true,
warnBeforeUnload: true,
request: { request: {
customHeaders: {}, customHeaders: {},
endpoint: "/server/upload", endpoint: "/server/upload",
@ -2329,8 +2433,10 @@
forceMultipart: true, forceMultipart: true,
inputName: "qqfile", inputName: "qqfile",
method: "POST", method: "POST",
omitDefaultParams: false,
params: {}, params: {},
paramsInBody: true, paramsInBody: true,
requireSuccessJson: true,
totalFileSizeName: "qqtotalfilesize", totalFileSizeName: "qqtotalfilesize",
uuidName: "qquuid" uuidName: "qquuid"
}, },
@ -2358,7 +2464,7 @@
onUpload: function(id, name) {}, onUpload: function(id, name) {},
onUploadChunk: function(id, name, chunkData) {}, onUploadChunk: function(id, name, chunkData) {},
onUploadChunkSuccess: function(id, chunkData, responseJSON, xhr) {}, onUploadChunkSuccess: function(id, chunkData, responseJSON, xhr) {},
onResume: function(id, fileName, chunkData) {}, onResume: function(id, fileName, chunkData, customResumeData) {},
onProgress: function(id, name, loaded, total) {}, onProgress: function(id, name, loaded, total) {},
onTotalProgress: function(loaded, total) {}, onTotalProgress: function(loaded, total) {},
onError: function(id, name, reason, maybeXhrOrXdr) {}, onError: function(id, name, reason, maybeXhrOrXdr) {},
@ -2411,9 +2517,20 @@
totalFileSize: "qqtotalfilesize", totalFileSize: "qqtotalfilesize",
totalParts: "qqtotalparts" totalParts: "qqtotalparts"
}, },
partSize: 2e6, partSize: function(id) {
return 2e6;
},
success: { success: {
endpoint: null endpoint: null,
headers: function(id) {
return null;
},
jsonPayload: false,
method: "POST",
params: function(id) {
return null;
},
resetOnStatus: []
} }
}, },
resume: { resume: {
@ -2421,6 +2538,9 @@
recordsExpireIn: 7, recordsExpireIn: 7,
paramNames: { paramNames: {
resuming: "qqresume" resuming: "qqresume"
},
customKeys: function(fileId) {
return [];
} }
}, },
formatFileName: function(fileOrBlobName) { formatFileName: function(fileOrBlobName) {
@ -2519,7 +2639,7 @@
this.log("Paste support module not found", "error"); this.log("Paste support module not found", "error");
} }
} }
this._preventLeaveInProgress(); this._options.warnBeforeUnload && this._preventLeaveInProgress();
this._imageGenerator = qq.ImageGenerator && new qq.ImageGenerator(qq.bind(this.log, this)); this._imageGenerator = qq.ImageGenerator && new qq.ImageGenerator(qq.bind(this.log, this));
this._refreshSessionData(); this._refreshSessionData();
this._succeededSinceLastAllComplete = []; this._succeededSinceLastAllComplete = [];
@ -2537,6 +2657,7 @@
}); });
} }
this._currentItemLimit = this._options.validation.itemLimit; this._currentItemLimit = this._options.validation.itemLimit;
this._customResumeDataStore = this._createStore();
}; };
qq.FineUploaderBasic.prototype = qq.basePublicApi; qq.FineUploaderBasic.prototype = qq.basePublicApi;
qq.extend(qq.FineUploaderBasic.prototype, qq.basePrivateApi); qq.extend(qq.FineUploaderBasic.prototype, qq.basePrivateApi);
@ -2606,7 +2727,7 @@
return xhrOrXdr; return xhrOrXdr;
} }
function getXhrOrXdr(id, suppliedXhr) { function getXhrOrXdr(id, suppliedXhr) {
var xhrOrXdr = requestData[id].xhr; var xhrOrXdr = requestData[id] && requestData[id].xhr;
if (!xhrOrXdr) { if (!xhrOrXdr) {
if (suppliedXhr) { if (suppliedXhr) {
xhrOrXdr = suppliedXhr; xhrOrXdr = suppliedXhr;
@ -2869,13 +2990,14 @@
onUploadChunk: function(id, fileName, chunkData) {}, onUploadChunk: function(id, fileName, chunkData) {},
onUploadChunkSuccess: function(id, chunkData, response, xhr) {}, onUploadChunkSuccess: function(id, chunkData, response, xhr) {},
onAutoRetry: function(id, fileName, response, xhr) {}, onAutoRetry: function(id, fileName, response, xhr) {},
onResume: function(id, fileName, chunkData) {}, onResume: function(id, fileName, chunkData, customResumeData) {},
onUuidChanged: function(id, newUuid) {}, onUuidChanged: function(id, newUuid) {},
getName: function(id) {}, getName: function(id) {},
setSize: function(id, newSize) {}, setSize: function(id, newSize) {},
isQueued: function(id) {}, isQueued: function(id) {},
getIdsInProxyGroup: function(id) {}, getIdsInProxyGroup: function(id) {},
getIdsInBatch: function(id) {} getIdsInBatch: function(id) {},
isInProgress: function(id) {}
}, chunked = { }, chunked = {
done: function(id, chunkIdx, response, xhr) { done: function(id, chunkIdx, response, xhr) {
var chunkData = handler._getChunkData(id, chunkIdx); var chunkData = handler._getChunkData(id, chunkIdx);
@ -2894,13 +3016,13 @@
handler._maybeDeletePersistedChunkData(id); handler._maybeDeletePersistedChunkData(id);
upload.cleanup(id, normaizedResponse, xhr); upload.cleanup(id, normaizedResponse, xhr);
}, function(response, xhr) { }, function(response, xhr) {
var normaizedResponse = upload.normalizeResponse(response, false); var normalizedResponse = upload.normalizeResponse(response, false);
log("Problem finalizing chunks for file ID " + id + " - " + normaizedResponse.error, "error"); log("Problem finalizing chunks for file ID " + id + " - " + normalizedResponse.error, "error");
if (normaizedResponse.reset) { if (normalizedResponse.reset || xhr && options.chunking.success.resetOnStatus.indexOf(xhr.status) >= 0) {
chunked.reset(id); chunked.reset(id);
} }
if (!options.onAutoRetry(id, name, normaizedResponse, xhr)) { if (!options.onAutoRetry(id, name, normalizedResponse, xhr)) {
upload.cleanup(id, normaizedResponse, xhr); upload.cleanup(id, normalizedResponse, xhr);
} }
}); });
}, },
@ -2912,7 +3034,8 @@
if (responseToReport.reset) { if (responseToReport.reset) {
chunked.reset(id); chunked.reset(id);
} else { } else {
inProgressIdx = qq.indexOf(handler._getFileState(id).chunking.inProgress, chunkIdx); var inProgressChunksArray = handler._getFileState(id).chunking.inProgress;
inProgressIdx = inProgressChunksArray ? qq.indexOf(inProgressChunksArray, chunkIdx) : -1;
if (inProgressIdx >= 0) { if (inProgressIdx >= 0) {
handler._getFileState(id).chunking.inProgress.splice(inProgressIdx, 1); handler._getFileState(id).chunking.inProgress.splice(inProgressIdx, 1);
handler._getFileState(id).chunking.remaining.unshift(chunkIdx); handler._getFileState(id).chunking.remaining.unshift(chunkIdx);
@ -2950,13 +3073,14 @@
handler._maybeDeletePersistedChunkData(id); handler._maybeDeletePersistedChunkData(id);
handler.reevaluateChunking(id); handler.reevaluateChunking(id);
handler._getFileState(id).loaded = 0; handler._getFileState(id).loaded = 0;
handler._getFileState(id).attemptingResume = false;
}, },
sendNext: function(id) { sendNext: function(id) {
var size = options.getSize(id), name = options.getName(id), chunkIdx = chunked.nextPart(id), chunkData = handler._getChunkData(id, chunkIdx), resuming = handler._getFileState(id).attemptingResume, inProgressChunks = handler._getFileState(id).chunking.inProgress || []; var size = options.getSize(id), name = options.getName(id), chunkIdx = chunked.nextPart(id), chunkData = handler._getChunkData(id, chunkIdx), fileState = handler._getFileState(id), resuming = fileState.attemptingResume, inProgressChunks = fileState.chunking.inProgress || [];
if (handler._getFileState(id).loaded == null) { if (fileState.loaded == null) {
handler._getFileState(id).loaded = 0; fileState.loaded = 0;
} }
if (resuming && options.onResume(id, name, chunkData) === false) { if (resuming && options.onResume(id, name, chunkData, fileState.customResumeData) === false) {
chunked.reset(id); chunked.reset(id);
chunkIdx = chunked.nextPart(id); chunkIdx = chunked.nextPart(id);
chunkData = handler._getChunkData(id, chunkIdx); chunkData = handler._getChunkData(id, chunkIdx);
@ -2965,8 +3089,6 @@
if (chunkIdx == null && inProgressChunks.length === 0) { if (chunkIdx == null && inProgressChunks.length === 0) {
chunked.finalize(id); chunked.finalize(id);
} else { } else {
log(qq.format("Sending chunked upload request for item {}.{}, bytes {}-{} of {}.", id, chunkIdx, chunkData.start + 1, chunkData.end, size));
options.onUploadChunk(id, name, handler._getChunkDataForCallback(chunkData));
inProgressChunks.push(chunkIdx); inProgressChunks.push(chunkIdx);
handler._getFileState(id).chunking.inProgress = inProgressChunks; handler._getFileState(id).chunking.inProgress = inProgressChunks;
if (concurrentChunkingPossible) { if (concurrentChunkingPossible) {
@ -2978,8 +3100,20 @@
if (chunkData.blob.size === 0) { if (chunkData.blob.size === 0) {
log(qq.format("Chunk {} for file {} will not be uploaded, zero sized chunk.", chunkIdx, id), "error"); log(qq.format("Chunk {} for file {} will not be uploaded, zero sized chunk.", chunkIdx, id), "error");
chunked.handleFailure(chunkIdx, id, "File is no longer available", null); chunked.handleFailure(chunkIdx, id, "File is no longer available", null);
}
var onUploadChunkPromise = options.onUploadChunk(id, name, handler._getChunkDataForCallback(chunkData));
onUploadChunkPromise.then(function(requestOverrides) {
if (!options.isInProgress(id)) {
log(qq.format("Not sending chunked upload request for item {}.{} - no longer in progress.", id, chunkIdx));
} else { } else {
handler.uploadChunk(id, chunkIdx, resuming).then(function success(response, xhr) { log(qq.format("Sending chunked upload request for item {}.{}, bytes {}-{} of {}.", id, chunkIdx, chunkData.start + 1, chunkData.end, size));
var uploadChunkData = {
chunkIdx: chunkIdx,
id: id,
overrides: requestOverrides,
resuming: resuming
};
handler.uploadChunk(uploadChunkData).then(function success(response, xhr) {
log("Chunked upload request succeeded for " + id + ", chunk " + chunkIdx); log("Chunked upload request succeeded for " + id + ", chunk " + chunkIdx);
handler.clearCachedChunk(id, chunkIdx); handler.clearCachedChunk(id, chunkIdx);
var inProgressChunks = handler._getFileState(id).chunking.inProgress || [], responseToReport = upload.normalizeResponse(response, true), inProgressChunkIdx = qq.indexOf(inProgressChunks, chunkIdx); var inProgressChunks = handler._getFileState(id).chunking.inProgress || [], responseToReport = upload.normalizeResponse(response, true), inProgressChunkIdx = qq.indexOf(inProgressChunks, chunkIdx);
@ -3002,6 +3136,9 @@
handler.clearXhr(id, chunkIdx); handler.clearXhr(id, chunkIdx);
}); });
} }
}, function(error) {
chunked.handleFailure(chunkIdx, id, error, null);
});
} }
} }
}, connectionManager = { }, connectionManager = {
@ -3077,7 +3214,12 @@
} }
}, simple = { }, simple = {
send: function(id, name) { send: function(id, name) {
handler._getFileState(id).loaded = 0; var fileState = handler._getFileState(id);
if (!fileState) {
log("Ignoring send request as this upload may have been cancelled, File ID " + id, "warn");
return;
}
fileState.loaded = 0;
log("Sending simple upload request for " + id); log("Sending simple upload request for " + id);
handler.uploadFile(id).then(function(response, optXhr) { handler.uploadFile(id).then(function(response, optXhr) {
log("Simple upload request succeeded for " + id); log("Simple upload request succeeded for " + id);
@ -3113,6 +3255,7 @@
initHandler: function() { initHandler: function() {
var handlerType = namespace ? qq[namespace] : qq.traditional, handlerModuleSubtype = qq.supportedFeatures.ajaxUploading ? "Xhr" : "Form"; var handlerType = namespace ? qq[namespace] : qq.traditional, handlerModuleSubtype = qq.supportedFeatures.ajaxUploading ? "Xhr" : "Form";
handler = new handlerType[handlerModuleSubtype + "UploadHandler"](options, { handler = new handlerType[handlerModuleSubtype + "UploadHandler"](options, {
getCustomResumeData: options.getCustomResumeData,
getDataByUuid: options.getDataByUuid, getDataByUuid: options.getDataByUuid,
getName: options.getName, getName: options.getName,
getSize: options.getSize, getSize: options.getSize,
@ -3120,7 +3263,10 @@
log: log, log: log,
onCancel: options.onCancel, onCancel: options.onCancel,
onProgress: options.onProgress, onProgress: options.onProgress,
onUuidChanged: options.onUuidChanged onUuidChanged: options.onUuidChanged,
onFinalizing: function(id) {
options.setStatus(id, qq.status.UPLOAD_FINALIZING);
}
}); });
if (handler._removeExpiredChunkingRecords) { if (handler._removeExpiredChunkingRecords) {
handler._removeExpiredChunkingRecords(); handler._removeExpiredChunkingRecords();
@ -3193,12 +3339,26 @@
if (!controller.isValid(id)) { if (!controller.isValid(id)) {
throw new qq.Error(id + " is not a valid file ID to upload!"); throw new qq.Error(id + " is not a valid file ID to upload!");
} }
options.onUpload(id, name); options.onUpload(id, name).then(function(response) {
if (response && response.pause) {
options.setStatus(id, qq.status.PAUSED);
handler.pause(id);
connectionManager.free(id);
} else {
if (chunkingPossible && handler._shouldChunkThisFile(id)) { if (chunkingPossible && handler._shouldChunkThisFile(id)) {
chunked.sendNext(id); chunked.sendNext(id);
} else { } else {
simple.send(id, name); simple.send(id, name);
} }
}
}, function(error) {
error = error || {};
log(id + " upload start aborted due to rejected onUpload Promise - details: " + error, "error");
if (!options.onAutoRetry(id, name, error.responseJSON || {})) {
var response = upload.normalizeResponse(error.responseJSON, false);
upload.cleanup(id, response);
}
});
}, },
start: function(id) { start: function(id) {
var blobToUpload = upload.getProxyOrBlob(id); var blobToUpload = upload.getProxyOrBlob(id);
@ -3277,6 +3437,13 @@
isValid: function(id) { isValid: function(id) {
return handler.isValid(id); return handler.isValid(id);
}, },
hasResumeRecord: function(id) {
var key = handler.isValid(id) && handler._getLocalStorageId && handler._getLocalStorageId(id);
if (key) {
return !!localStorage.getItem(key);
}
return false;
},
getResumableFilesData: function() { getResumableFilesData: function() {
if (handler.getResumableFilesData) { if (handler.getResumableFilesData) {
return handler.getResumableFilesData(); return handler.getResumableFilesData();
@ -3296,6 +3463,9 @@
} }
return false; return false;
}, },
isAttemptingResume: function(id) {
return !!handler.isAttemptingResume && handler.isAttemptingResume(id);
},
isResumable: function(id) { isResumable: function(id) {
return !!handler.isResumable && handler.isResumable(id); return !!handler.isResumable && handler.isResumable(id);
} }
@ -3486,7 +3656,19 @@
}; };
qq.XhrUploadHandler = function(spec) { qq.XhrUploadHandler = function(spec) {
"use strict"; "use strict";
var handler = this, namespace = spec.options.namespace, proxy = spec.proxy, chunking = spec.options.chunking, resume = spec.options.resume, chunkFiles = chunking && spec.options.chunking.enabled && qq.supportedFeatures.chunking, resumeEnabled = resume && spec.options.resume.enabled && chunkFiles && qq.supportedFeatures.resume, getName = proxy.getName, getSize = proxy.getSize, getUuid = proxy.getUuid, getEndpoint = proxy.getEndpoint, getDataByUuid = proxy.getDataByUuid, onUuidChanged = proxy.onUuidChanged, onProgress = proxy.onProgress, log = proxy.log; var handler = this, namespace = spec.options.namespace, proxy = spec.proxy, chunking = spec.options.chunking, getChunkSize = function(id) {
var fileState = handler._getFileState(id);
if (fileState.chunkSize) {
return fileState.chunkSize;
} else {
var chunkSize = chunking.partSize;
if (qq.isFunction(chunkSize)) {
chunkSize = chunkSize(id, getSize(id));
}
fileState.chunkSize = chunkSize;
return chunkSize;
}
}, resume = spec.options.resume, chunkFiles = chunking && spec.options.chunking.enabled && qq.supportedFeatures.chunking, resumeEnabled = resume && spec.options.resume.enabled && chunkFiles && qq.supportedFeatures.resume, getName = proxy.getName, getSize = proxy.getSize, getUuid = proxy.getUuid, getEndpoint = proxy.getEndpoint, getDataByUuid = proxy.getDataByUuid, onUuidChanged = proxy.onUuidChanged, onProgress = proxy.onProgress, log = proxy.log, getCustomResumeData = proxy.getCustomResumeData;
function abort(id) { function abort(id) {
qq.each(handler._getXhrs(id), function(xhrId, xhr) { qq.each(handler._getXhrs(id), function(xhrId, xhr) {
var ajaxRequester = handler._getAjaxRequester(id, xhrId); var ajaxRequester = handler._getAjaxRequester(id, xhrId);
@ -3524,7 +3706,10 @@
}); });
qq.extend(this, { qq.extend(this, {
clearCachedChunk: function(id, chunkIdx) { clearCachedChunk: function(id, chunkIdx) {
delete handler._getFileState(id).temp.cachedChunks[chunkIdx]; var fileState = handler._getFileState(id);
if (fileState) {
delete fileState.temp.cachedChunks[chunkIdx];
}
}, },
clearXhr: function(id, chunkIdx) { clearXhr: function(id, chunkIdx) {
var tempState = handler._getFileState(id).temp; var tempState = handler._getFileState(id).temp;
@ -3561,15 +3746,21 @@
if (uploadData.key) { if (uploadData.key) {
data.key = uploadData.key; data.key = uploadData.key;
} }
if (uploadData.customResumeData) {
data.customResumeData = uploadData.customResumeData;
}
resumableFilesData.push(data); resumableFilesData.push(data);
}); });
return resumableFilesData; return resumableFilesData;
}, },
isAttemptingResume: function(id) {
return handler._getFileState(id).attemptingResume;
},
isResumable: function(id) { isResumable: function(id) {
return !!chunking && handler.isValid(id) && !handler._getFileState(id).notResumable; return !!chunking && handler.isValid(id) && !handler._getFileState(id).notResumable;
}, },
moveInProgressToRemaining: function(id, optInProgress, optRemaining) { moveInProgressToRemaining: function(id, optInProgress, optRemaining) {
var inProgress = optInProgress || handler._getFileState(id).chunking.inProgress, remaining = optRemaining || handler._getFileState(id).chunking.remaining; var fileState = handler._getFileState(id) || {}, chunkingState = fileState.chunking || {}, inProgress = optInProgress || chunkingState.inProgress, remaining = optRemaining || chunkingState.remaining;
if (inProgress) { if (inProgress) {
log(qq.format("Moving these chunks from in-progress {}, to remaining.", JSON.stringify(inProgress))); log(qq.format("Moving these chunks from in-progress {}, to remaining.", JSON.stringify(inProgress)));
inProgress.reverse(); inProgress.reverse();
@ -3628,7 +3819,7 @@
return handler._getFileState(id).temp.ajaxRequesters[chunkIdx]; return handler._getFileState(id).temp.ajaxRequesters[chunkIdx];
}, },
_getChunkData: function(id, chunkIndex) { _getChunkData: function(id, chunkIndex) {
var chunkSize = chunking.partSize, fileSize = getSize(id), fileOrBlob = handler.getFile(id), startBytes = chunkSize * chunkIndex, endBytes = startBytes + chunkSize >= fileSize ? fileSize : startBytes + chunkSize, totalChunks = handler._getTotalChunks(id), cachedChunks = this._getFileState(id).temp.cachedChunks, blob = cachedChunks[chunkIndex] || qq.sliceBlob(fileOrBlob, startBytes, endBytes); var chunkSize = getChunkSize(id), fileSize = getSize(id), fileOrBlob = handler.getFile(id), startBytes = chunkSize * chunkIndex, endBytes = startBytes + chunkSize >= fileSize ? fileSize : startBytes + chunkSize, totalChunks = handler._getTotalChunks(id), cachedChunks = this._getFileState(id).temp.cachedChunks, blob = cachedChunks[chunkIndex] || qq.sliceBlob(fileOrBlob, startBytes, endBytes);
cachedChunks[chunkIndex] = blob; cachedChunks[chunkIndex] = blob;
return { return {
part: chunkIndex, part: chunkIndex,
@ -3648,8 +3839,11 @@
}; };
}, },
_getLocalStorageId: function(id) { _getLocalStorageId: function(id) {
var formatVersion = "5.0", name = getName(id), size = getSize(id), chunkSize = chunking.partSize, endpoint = getEndpoint(id); var formatVersion = "5.0", name = getName(id), size = getSize(id), chunkSize = getChunkSize(id), endpoint = getEndpoint(id), customKeys = resume.customKeys(id), localStorageId = qq.format("qq{}resume{}-{}-{}-{}-{}", namespace, formatVersion, name, size, chunkSize, endpoint);
return qq.format("qq{}resume{}-{}-{}-{}-{}", namespace, formatVersion, name, size, chunkSize, endpoint); customKeys.forEach(function(key) {
localStorageId += "-" + key;
});
return localStorageId;
}, },
_getMimeType: function(id) { _getMimeType: function(id) {
return handler.getFile(id).type; return handler.getFile(id).type;
@ -3659,7 +3853,7 @@
}, },
_getTotalChunks: function(id) { _getTotalChunks: function(id) {
if (chunking) { if (chunking) {
var fileSize = getSize(id), chunkSize = chunking.partSize; var fileSize = getSize(id), chunkSize = getChunkSize(id);
return Math.ceil(fileSize / chunkSize); return Math.ceil(fileSize / chunkSize);
} }
}, },
@ -3717,6 +3911,7 @@
state.key = persistedData.key; state.key = persistedData.key;
state.chunking = persistedData.chunking; state.chunking = persistedData.chunking;
state.loaded = persistedData.loaded; state.loaded = persistedData.loaded;
state.customResumeData = persistedData.customResumeData;
state.attemptingResume = true; state.attemptingResume = true;
handler.moveInProgressToRemaining(id); handler.moveInProgressToRemaining(id);
} }
@ -3726,6 +3921,7 @@
_maybePersistChunkedState: function(id) { _maybePersistChunkedState: function(id) {
var state = handler._getFileState(id), localStorageId, persistedData; var state = handler._getFileState(id), localStorageId, persistedData;
if (resumeEnabled && handler.isResumable(id)) { if (resumeEnabled && handler.isResumable(id)) {
var customResumeData = getCustomResumeData(id);
localStorageId = handler._getLocalStorageId(id); localStorageId = handler._getLocalStorageId(id);
persistedData = { persistedData = {
name: getName(id), name: getName(id),
@ -3736,6 +3932,9 @@
loaded: state.loaded, loaded: state.loaded,
lastUpdated: Date.now() lastUpdated: Date.now()
}; };
if (customResumeData) {
persistedData.customResumeData = customResumeData;
}
try { try {
localStorage.setItem(localStorageId, JSON.stringify(persistedData)); localStorage.setItem(localStorageId, JSON.stringify(persistedData));
} catch (error) { } catch (error) {
@ -3792,11 +3991,13 @@
}, },
_shouldChunkThisFile: function(id) { _shouldChunkThisFile: function(id) {
var state = handler._getFileState(id); var state = handler._getFileState(id);
if (state) {
if (!state.chunking) { if (!state.chunking) {
handler.reevaluateChunking(id); handler.reevaluateChunking(id);
} }
return state.chunking.enabled; return state.chunking.enabled;
} }
}
}); });
}; };
qq.DeleteFileAjaxRequester = function(o) { qq.DeleteFileAjaxRequester = function(o) {
@ -5322,18 +5523,24 @@
"use strict"; "use strict";
var handler = this, getName = proxy.getName, getSize = proxy.getSize, getUuid = proxy.getUuid, log = proxy.log, multipart = spec.forceMultipart || spec.paramsInBody, addChunkingSpecificParams = function(id, params, chunkData) { var handler = this, getName = proxy.getName, getSize = proxy.getSize, getUuid = proxy.getUuid, log = proxy.log, multipart = spec.forceMultipart || spec.paramsInBody, addChunkingSpecificParams = function(id, params, chunkData) {
var size = getSize(id), name = getName(id); var size = getSize(id), name = getName(id);
if (!spec.omitDefaultParams) {
params[spec.chunking.paramNames.partIndex] = chunkData.part; params[spec.chunking.paramNames.partIndex] = chunkData.part;
params[spec.chunking.paramNames.partByteOffset] = chunkData.start; params[spec.chunking.paramNames.partByteOffset] = chunkData.start;
params[spec.chunking.paramNames.chunkSize] = chunkData.size; params[spec.chunking.paramNames.chunkSize] = chunkData.size;
params[spec.chunking.paramNames.totalParts] = chunkData.count; params[spec.chunking.paramNames.totalParts] = chunkData.count;
params[spec.totalFileSizeName] = size; params[spec.totalFileSizeName] = size;
if (multipart) { }
if (multipart && !spec.omitDefaultParams) {
params[spec.filenameParam] = name; params[spec.filenameParam] = name;
} }
}, allChunksDoneRequester = new qq.traditional.AllChunksDoneAjaxRequester({ }, allChunksDoneRequester = new qq.traditional.AllChunksDoneAjaxRequester({
cors: spec.cors, cors: spec.cors,
endpoint: spec.chunking.success.endpoint, endpoint: spec.chunking.success.endpoint,
log: log headers: spec.chunking.success.headers,
jsonPayload: spec.chunking.success.jsonPayload,
log: log,
method: spec.chunking.success.method,
params: spec.chunking.success.params
}), createReadyStateChangedHandler = function(id, xhr) { }), createReadyStateChangedHandler = function(id, xhr) {
var promise = new qq.Promise(); var promise = new qq.Promise();
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
@ -5355,7 +5562,7 @@
params[spec.chunking.paramNames.totalParts] = handler._getTotalChunks(id); params[spec.chunking.paramNames.totalParts] = handler._getTotalChunks(id);
return params; return params;
}, isErrorUploadResponse = function(xhr, response) { }, isErrorUploadResponse = function(xhr, response) {
return qq.indexOf([ 200, 201, 202, 203, 204 ], xhr.status) < 0 || !response.success || response.reset; return qq.indexOf([ 200, 201, 202, 203, 204 ], xhr.status) < 0 || spec.requireSuccessJson && !response.success || response.reset;
}, onUploadOrChunkComplete = function(id, xhr) { }, onUploadOrChunkComplete = function(id, xhr) {
var response; var response;
log("xhr - server response received for " + id); log("xhr - server response received for " + id);
@ -5371,7 +5578,7 @@
log(qq.format("Received response status {} with body: {}", xhr.status, xhr.responseText)); log(qq.format("Received response status {} with body: {}", xhr.status, xhr.responseText));
response = qq.parseJson(xhr.responseText); response = qq.parseJson(xhr.responseText);
} catch (error) { } catch (error) {
upload && log("Error when attempting to parse xhr response text (" + error.message + ")", "error"); upload && spec.requireSuccessJson && log("Error when attempting to parse xhr response text (" + error.message + ")", "error");
} }
return response; return response;
}, sendChunksCompleteRequest = function(id) { }, sendChunksCompleteRequest = function(id) {
@ -5382,17 +5589,32 @@
promise.failure(parseResponse(false, xhr), xhr); promise.failure(parseResponse(false, xhr), xhr);
}); });
return promise; return promise;
}, setParamsAndGetEntityToSend = function(params, xhr, fileOrBlob, id) { }, setParamsAndGetEntityToSend = function(entityToSendParams) {
var formData = new FormData(), method = spec.method, endpoint = spec.endpointStore.get(id), name = getName(id), size = getSize(id); var fileOrBlob = entityToSendParams.fileOrBlob;
var id = entityToSendParams.id;
var xhr = entityToSendParams.xhr;
var xhrOverrides = entityToSendParams.xhrOverrides || {};
var customParams = entityToSendParams.customParams || {};
var defaultParams = entityToSendParams.params || {};
var xhrOverrideParams = xhrOverrides.params || {};
var params;
var formData = multipart ? new FormData() : null, method = xhrOverrides.method || spec.method, endpoint = xhrOverrides.endpoint || spec.endpointStore.get(id), name = getName(id), size = getSize(id);
if (spec.omitDefaultParams) {
params = qq.extend({}, customParams);
qq.extend(params, xhrOverrideParams);
} else {
params = qq.extend({}, customParams);
qq.extend(params, xhrOverrideParams);
qq.extend(params, defaultParams);
params[spec.uuidName] = getUuid(id); params[spec.uuidName] = getUuid(id);
params[spec.filenameParam] = name; params[spec.filenameParam] = name;
if (multipart) { if (multipart) {
params[spec.totalFileSizeName] = size; params[spec.totalFileSizeName] = size;
} } else if (!spec.paramsInBody) {
if (!spec.paramsInBody) {
if (!multipart) {
params[spec.inputName] = name; params[spec.inputName] = name;
} }
}
if (!spec.paramsInBody) {
endpoint = qq.obj2url(params, endpoint); endpoint = qq.obj2url(params, endpoint);
} }
xhr.open(method, endpoint, true); xhr.open(method, endpoint, true);
@ -5407,7 +5629,15 @@
return formData; return formData;
} }
return fileOrBlob; return fileOrBlob;
}, setUploadHeaders = function(id, xhr) { }, setUploadHeaders = function(headersOptions) {
var headerOverrides = headersOptions.headerOverrides;
var id = headersOptions.id;
var xhr = headersOptions.xhr;
if (headerOverrides) {
qq.each(headerOverrides, function(headerName, headerValue) {
xhr.setRequestHeader(headerName, headerValue);
});
} else {
var extraHeaders = spec.customHeaders.get(id), fileOrBlob = handler.getFile(id); var extraHeaders = spec.customHeaders.get(id), fileOrBlob = handler.getFile(id);
xhr.setRequestHeader("Accept", "application/json"); xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
@ -5419,30 +5649,54 @@
qq.each(extraHeaders, function(name, val) { qq.each(extraHeaders, function(name, val) {
xhr.setRequestHeader(name, val); xhr.setRequestHeader(name, val);
}); });
}
}; };
qq.extend(this, { qq.extend(this, {
uploadChunk: function(id, chunkIdx, resuming) { uploadChunk: function(uploadChunkParams) {
var chunkData = handler._getChunkData(id, chunkIdx), xhr = handler._createXhr(id, chunkIdx), size = getSize(id), promise, toSend, params; var id = uploadChunkParams.id;
var chunkIdx = uploadChunkParams.chunkIdx;
var overrides = uploadChunkParams.overrides || {};
var resuming = uploadChunkParams.resuming;
var chunkData = handler._getChunkData(id, chunkIdx), xhr = handler._createXhr(id, chunkIdx), promise, toSend, customParams, params = {};
promise = createReadyStateChangedHandler(id, xhr); promise = createReadyStateChangedHandler(id, xhr);
handler._registerProgressHandler(id, chunkIdx, chunkData.size); handler._registerProgressHandler(id, chunkIdx, chunkData.size);
params = spec.paramsStore.get(id); customParams = spec.paramsStore.get(id);
addChunkingSpecificParams(id, params, chunkData); addChunkingSpecificParams(id, params, chunkData);
if (resuming) { if (resuming) {
params[spec.resume.paramNames.resuming] = true; params[spec.resume.paramNames.resuming] = true;
} }
toSend = setParamsAndGetEntityToSend(params, xhr, chunkData.blob, id); toSend = setParamsAndGetEntityToSend({
setUploadHeaders(id, xhr); fileOrBlob: chunkData.blob,
id: id,
customParams: customParams,
params: params,
xhr: xhr,
xhrOverrides: overrides
});
setUploadHeaders({
headerOverrides: overrides.headers,
id: id,
xhr: xhr
});
xhr.send(toSend); xhr.send(toSend);
return promise; return promise;
}, },
uploadFile: function(id) { uploadFile: function(id) {
var fileOrBlob = handler.getFile(id), promise, xhr, params, toSend; var fileOrBlob = handler.getFile(id), promise, xhr, customParams, toSend;
xhr = handler._createXhr(id); xhr = handler._createXhr(id);
handler._registerProgressHandler(id); handler._registerProgressHandler(id);
promise = createReadyStateChangedHandler(id, xhr); promise = createReadyStateChangedHandler(id, xhr);
params = spec.paramsStore.get(id); customParams = spec.paramsStore.get(id);
toSend = setParamsAndGetEntityToSend(params, xhr, fileOrBlob, id); toSend = setParamsAndGetEntityToSend({
setUploadHeaders(id, xhr); fileOrBlob: fileOrBlob,
id: id,
customParams: customParams,
xhr: xhr
});
setUploadHeaders({
id: id,
xhr: xhr
});
xhr.send(toSend); xhr.send(toSend);
return promise; return promise;
} }
@ -5458,6 +5712,7 @@
qq.override(this, function(super_) { qq.override(this, function(super_) {
return { return {
finalizeChunks: function(id) { finalizeChunks: function(id) {
proxy.onFinalizing(id);
if (spec.chunking.success.endpoint) { if (spec.chunking.success.endpoint) {
return sendChunksCompleteRequest(id); return sendChunksCompleteRequest(id);
} else { } else {
@ -5469,24 +5724,29 @@
}; };
qq.traditional.AllChunksDoneAjaxRequester = function(o) { qq.traditional.AllChunksDoneAjaxRequester = function(o) {
"use strict"; "use strict";
var requester, method = "POST", options = { var requester, options = {
cors: { cors: {
allowXdr: false, allowXdr: false,
expected: false, expected: false,
sendCredentials: false sendCredentials: false
}, },
endpoint: null, endpoint: null,
log: function(str, level) {} log: function(str, level) {},
method: "POST"
}, promises = {}, endpointHandler = { }, promises = {}, endpointHandler = {
get: function(id) { get: function(id) {
if (qq.isFunction(options.endpoint)) {
return options.endpoint(id);
}
return options.endpoint; return options.endpoint;
} }
}; };
qq.extend(options, o); qq.extend(options, o);
requester = qq.extend(this, new qq.AjaxRequester({ requester = qq.extend(this, new qq.AjaxRequester({
acceptHeader: "application/json", acceptHeader: "application/json",
validMethods: [ method ], contentType: options.jsonPayload ? "application/json" : "application/x-www-form-urlencoded",
method: method, validMethods: [ options.method ],
method: options.method,
endpointStore: endpointHandler, endpointStore: endpointHandler,
allowXRequestedWithAndCacheControl: false, allowXRequestedWithAndCacheControl: false,
cors: options.cors, cors: options.cors,
@ -5506,7 +5766,7 @@
var promise = new qq.Promise(); var promise = new qq.Promise();
options.log("Submitting All Chunks Done request for " + id); options.log("Submitting All Chunks Done request for " + id);
promises[id] = promise; promises[id] = promise;
requester.initTransport(id).withParams(params).withHeaders(headers).send(xhr); requester.initTransport(id).withParams(options.params(id) || params).withHeaders(options.headers(id) || headers).send(xhr);
return promise; return promise;
} }
}); });

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.qq-uploader{position:relative;width:100%}.qq-upload-button{display:block;width:105px;padding:7px 0;text-align:center;background:#800;border-bottom:1px solid #DDD;color:#FFF}.qq-upload-button-hover{background:#C00}.qq-upload-button-focus{outline:#000 dotted 1px}.qq-upload-drop-area,.qq-upload-extra-drop-area{position:absolute;top:0;left:0;width:100%;height:100%;min-height:30px;z-index:2;background:#FF9797;text-align:center}.qq-upload-drop-area span{display:block;position:absolute;top:50%;width:100%;margin-top:-8px;font-size:16px}.qq-upload-extra-drop-area{position:relative;margin-top:50px;font-size:16px;padding-top:30px;height:20px;min-height:40px}.qq-upload-drop-area-active{background:#FF7171}.qq-upload-list{margin:0;padding:0;list-style:none}.qq-upload-list li{margin:0;padding:9px;line-height:15px;font-size:16px;background-color:#FFF0BD}.qq-upload-cancel,.qq-upload-continue,.qq-upload-delete,.qq-upload-failed-text,.qq-upload-file,.qq-upload-pause,.qq-upload-retry,.qq-upload-size,.qq-upload-spinner{margin-right:12px;display:inline}.qq-upload-spinner{display:inline-block;background:url(loading.gif);width:15px;height:15px;vertical-align:text-bottom}.qq-drop-processing{display:block}.qq-drop-processing-spinner{display:inline-block;background:url(processing.gif);width:24px;height:24px;vertical-align:text-bottom}.qq-upload-continue,.qq-upload-delete,.qq-upload-pause{display:inline}.qq-upload-cancel,.qq-upload-continue,.qq-upload-delete,.qq-upload-pause,.qq-upload-retry{color:#000}.qq-upload-cancel,.qq-upload-continue,.qq-upload-delete,.qq-upload-pause,.qq-upload-retry,.qq-upload-size{font-size:12px;font-weight:400}.qq-upload-failed-text{display:none;font-style:italic;font-weight:700}.qq-upload-failed-icon{display:none;width:15px;height:15px;vertical-align:text-bottom}.qq-upload-fail .qq-upload-failed-text{display:inline}.qq-upload-retrying .qq-upload-failed-text{display:inline;color:#D60000}.qq-upload-list li.qq-upload-success{background-color:#5DA30C;color:#FFF}.qq-upload-list li.qq-upload-fail{background-color:#D60000;color:#FFF}.qq-progress-bar{display:block;background:-moz-linear-gradient(top,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(30,87,153,1)),color-stop(50%,rgba(41,137,216,1)),color-stop(51%,rgba(32,124,202,1)),color-stop(100%,rgba(125,185,232,1)));background:-webkit-linear-gradient(top,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);background:-o-linear-gradient(top,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);background:-ms-linear-gradient(top,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);background:linear-gradient(to bottom,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);width:0;height:15px;border-radius:6px;margin-bottom:3px}.qq-total-progress-bar{height:25px;border-radius:9px}.qq-total-progress-bar-container{margin:9px}INPUT.qq-edit-filename{position:absolute;opacity:0;filter:alpha(opacity=0);z-index:-1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}.qq-upload-file.qq-editable{cursor:pointer}.qq-edit-filename-icon.qq-editable{display:inline-block;cursor:pointer}.qq-hide,.qq-uploader DIALOG{display:none}INPUT.qq-edit-filename.qq-editing{position:static;margin-top:-5px;margin-right:10px;margin-bottom:-5px;opacity:1;filter:alpha(opacity=100);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}.qq-edit-filename-icon{display:none;background:url(edit.gif);width:15px;height:15px;vertical-align:text-bottom;margin-right:5px}.qq-uploader DIALOG[open]{display:block}.qq-uploader DIALOG .qq-dialog-buttons{text-align:center;padding-top:10px}.qq-uploader DIALOG .qq-dialog-buttons BUTTON{margin-left:5px;margin-right:5px}.qq-uploader DIALOG .qq-dialog-message-selector{padding-bottom:10px}.qq-uploader DIALOG::backdrop{background-color:rgba(0,0,0,.7)}/*# sourceMappingURL=fine-uploader.min.css.map */ .qq-uploader{position:relative;width:100%}.qq-upload-button{display:block;width:105px;padding:7px 0;text-align:center;background:#800;border-bottom:1px solid #ddd;color:#fff}.qq-upload-button-hover{background:#c00}.qq-upload-button-focus{outline:1px dotted #000}.qq-upload-drop-area,.qq-upload-extra-drop-area{position:absolute;top:0;left:0;width:100%;height:100%;min-height:30px;z-index:2;background:#ff9797;text-align:center}.qq-upload-drop-area span{display:block;position:absolute;top:50%;width:100%;margin-top:-8px;font-size:16px}.qq-upload-extra-drop-area{position:relative;margin-top:50px;font-size:16px;padding-top:30px;height:20px;min-height:40px}.qq-upload-drop-area-active{background:#ff7171}.qq-upload-list{margin:0;padding:0;list-style:none}.qq-upload-list li{margin:0;padding:9px;line-height:15px;font-size:16px;background-color:#fff0bd}.qq-upload-cancel,.qq-upload-continue,.qq-upload-delete,.qq-upload-failed-text,.qq-upload-file,.qq-upload-pause,.qq-upload-retry,.qq-upload-size,.qq-upload-spinner{margin-right:12px;display:inline}.qq-upload-spinner{display:inline-block;background:url(loading.gif);width:15px;height:15px;vertical-align:text-bottom}.qq-drop-processing{display:block}.qq-drop-processing-spinner{display:inline-block;background:url(processing.gif);width:24px;height:24px;vertical-align:text-bottom}.qq-upload-continue,.qq-upload-delete,.qq-upload-pause{display:inline}.qq-upload-cancel,.qq-upload-continue,.qq-upload-delete,.qq-upload-pause,.qq-upload-retry{color:#000}.qq-upload-cancel,.qq-upload-continue,.qq-upload-delete,.qq-upload-pause,.qq-upload-retry,.qq-upload-size{font-size:12px;font-weight:400}.qq-upload-failed-text{display:none;font-style:italic;font-weight:700}.qq-upload-failed-icon{display:none;width:15px;height:15px;vertical-align:text-bottom}.qq-upload-fail .qq-upload-failed-text{display:inline}.qq-upload-retrying .qq-upload-failed-text{display:inline;color:#d60000}.qq-upload-list li.qq-upload-success{background-color:#5da30c;color:#fff}.qq-upload-list li.qq-upload-fail{background-color:#d60000;color:#fff}.qq-progress-bar{display:block;background:-moz-linear-gradient(top,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(30,87,153,1)),color-stop(50%,rgba(41,137,216,1)),color-stop(51%,rgba(32,124,202,1)),color-stop(100%,rgba(125,185,232,1)));background:-webkit-linear-gradient(top,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);background:-o-linear-gradient(top,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);background:-ms-linear-gradient(top,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);background:linear-gradient(to bottom,rgba(30,87,153,1) 0,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);width:0;height:15px;border-radius:6px;margin-bottom:3px}.qq-total-progress-bar{height:25px;border-radius:9px}.qq-total-progress-bar-container{margin:9px}INPUT.qq-edit-filename{position:absolute;opacity:0;z-index:-1}.qq-upload-file.qq-editable{cursor:pointer}.qq-edit-filename-icon.qq-editable{display:inline-block;cursor:pointer}INPUT.qq-edit-filename.qq-editing{position:static;margin-top:-5px;margin-right:10px;margin-bottom:-5px;opacity:1}.qq-edit-filename-icon{display:none;background:url(edit.gif);width:15px;height:15px;vertical-align:text-bottom;margin-right:5px}.qq-hide{display:none}.qq-uploader DIALOG{display:none}.qq-uploader DIALOG[open]{display:block}.qq-uploader DIALOG{display:none}.qq-uploader DIALOG[open]{display:block}.qq-uploader DIALOG .qq-dialog-buttons{text-align:center;padding-top:10px}.qq-uploader DIALOG .qq-dialog-buttons BUTTON{margin-left:5px;margin-right:5px}.qq-uploader DIALOG .qq-dialog-message-selector{padding-bottom:10px}.qq-uploader DIALOG::backdrop{background-color:rgba(0,0,0,.7)}/*# sourceMappingURL=fine-uploader.min.css.map */

View File

@ -1 +1 @@
{"version":3,"sources":["_build/fine-uploader.css"],"names":[],"mappings":"AAAA,aACI,SAAU,SACV,MAAO,KAEX,kBACI,QAAS,MACT,MAAO,MACP,QAAS,IAAI,EACb,WAAY,OACZ,WAAY,KACZ,cAAe,IAAI,MAAM,KACzB,MAAO,KAEX,wBACI,WAAY,KAEhB,wBACI,QAAoB,KAAP,OAAJ,IAEb,qBAAsB,2BAClB,SAAU,SACV,IAAK,EACL,KAAM,EACN,MAAO,KACP,OAAQ,KACR,WAAY,KACZ,QAAS,EACT,WAAY,QACZ,WAAY,OAEhB,0BACI,QAAS,MACT,SAAU,SACV,IAAK,IACL,MAAO,KACP,WAAY,KACZ,UAAW,KAEf,2BACI,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hB,uBACI,QAAS,KACT,WAAY,cACZ,MAAO,KACP,OAAQ,KACR,eAAgB,YAChB,aAAc,IAoBlB,0BACI,QAAS,MAGb,uCACI,WAAY,OACZ,YAAa,KAGjB,8CACI,YAAa,IACb,aAAc,IAGlB,gDACI,eAAgB,KAGpB,8BACI,iBAAkB"} {"version":3,"sources":["_build/fine-uploader.css"],"names":[],"mappings":"AAAA,aACI,SAAU,SACV,MAAO,KAEX,kBACI,QAAS,MACT,MAAO,MACP,QAAS,IAAI,EACb,WAAY,OACZ,WAAY,KACZ,cAAe,IAAI,MAAM,KACzB,MAAO,KAEX,wBACI,WAAY,KAEhB,wBACI,QAAS,IAAI,OAAO,KAExB,qBAAsB,2BAClB,SAAU,SACV,IAAK,EACL,KAAM,EACN,MAAO,KACP,OAAQ,KACR,WAAY,KACZ,QAAS,EACT,WAAY,QACZ,WAAY,OAEhB,0BACI,QAAS,MACT,SAAU,SACV,IAAK,IACL,MAAO,KACP,WAAY,KACZ,UAAW,KAEf,2BACI,SAAU,SACV,WAAY,KACZ,UAAW,KACX,YAAa,KACb,OAAQ,KACR,WAAY,KAEhB,4BACI,WAAY,QAEhB,gBACI,OAAQ,EACR,QAAS,EACT,WAAY,KAEhB,mBACI,OAAQ,EACR,QAAS,IACT,YAAa,KACb,UAAW,KACX,iBAAkB,QAGtB,kBACqC,oBAArC,kBADqC,uBADrC,gBAEmB,iBADA,iBADkB,gBAApB,mBAGb,aAAc,KACd,QAAS,OAIb,mBACI,QAAS,aACT,WAAY,iBACZ,MAAO,KACP,OAAQ,KACR,eAAgB,YAEpB,oBACI,QAAS,MAEb,4BACI,QAAS,aACT,WAAY,oBACZ,MAAO,KACP,OAAQ,KACR,eAAgB,YAGiB,oBAArC,kBAAmB,iBACf,QAAS,OAGwB,kBACnB,oBADA,kBAClB,iBADA,iBAEI,MAAO,KAGM,kBACoB,oBAArC,kBAAmB,iBADiB,iBAApC,gBAEI,UAAW,KACX,YAAa,IAEjB,uBACI,QAAS,KACT,WAAY,OACZ,YAAa,IAEjB,uBACI,QAAQ,KACR,MAAM,KACN,OAAO,KACP,eAAe,YAEnB,uCACI,QAAS,OAEb,2CACI,QAAS,OACT,MAAO,QAEX,qCACI,iBAAkB,QAClB,MAAO,KAEX,kCACI,iBAAkB,QAClB,MAAO,KAEX,iBACI,QAAS,MACT,WAAY,qHACZ,WAAY,yLACZ,WAAY,wHACZ,WAAY,mHACZ,WAAY,oHACZ,WAAY,sHACZ,MAAO,EACP,OAAQ,KACR,cAAe,IACf,cAAe,IAGnB,uBACI,OAAQ,KACR,cAAe,IAGnB,iCACI,OAAQ,IAGZ,uBACI,SAAU,SACV,QAAS,EAET,QAAS,GAIb,4BACI,OAAQ,QAGZ,mCACI,QAAS,aACT,OAAQ,QAGZ,kCACI,SAAU,OACV,WAAY,KACZ,aAAc,KACd,cAAe,KAEf,QAAS,EAKb,uBACI,QAAS,KACT,WAAY,cACZ,MAAO,KACP,OAAQ,KACR,eAAgB,YAChB,aAAc,IAGlB,SACI,QAAS,KAIb,oBACI,QAAS,KAGb,0BACI,QAAS,MAGb,oBACI,QAAS,KAGb,0BACI,QAAS,MAGb,uCACI,WAAY,OACZ,YAAa,KAGjB,8CACI,YAAa,IACb,aAAc,IAGlB,gDACI,eAAgB,KAGpB,8BACI,iBAAkB"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long