Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Commit

Permalink
chore(js/uploader.basic.js): unclutter options
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Nicholus committed Dec 18, 2013
1 parent ad245ae commit 81b1dcc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/js/uploader.basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
maxConnections: 3,
disableCancelForFormUploads: false,
autoUpload: true,

request: {
endpoint: "/server/upload",
params: {},
Expand All @@ -22,6 +23,7 @@
totalFileSizeName: "qqtotalfilesize",
filenameParam: "qqfilename"
},

validation: {
allowedExtensions: [],
sizeLimit: 0,
Expand All @@ -36,6 +38,7 @@
minWidth: 0
}
},

callbacks: {
onSubmit: function(id, name){},
onSubmitted: function(id, name){},
Expand All @@ -57,6 +60,7 @@
onPasteReceived: function(blob) {},
onStatusChange: function(id, oldStatus, newStatus) {}
},

messages: {
typeError: "{file} has an invalid extension. Valid extension(s): {extensions}.",
sizeError: "{file} is too large, maximum file size is {sizeLimit}.",
Expand All @@ -71,16 +75,19 @@
retryFailTooManyItems: "Retry failed - you have reached your file limit.",
onLeave: "The files are being uploaded, if you leave now the upload will be cancelled."
},

retry: {
enableAuto: false,
maxAutoAttempts: 3,
autoAttemptDelay: 5,
preventRetryResponseProperty: "preventRetry"
},

classes: {
buttonHover: "qq-upload-button-hover",
buttonFocus: "qq-upload-button-focus"
},

chunking: {
enabled: false,
partSize: 2000000,
Expand All @@ -92,6 +99,7 @@
totalParts: "qqtotalparts"
}
},

resume: {
enabled: false,
id: null,
Expand All @@ -100,35 +108,42 @@
resuming: "qqresume"
}
},

formatFileName: function(fileOrBlobName) {
if (fileOrBlobName !== undefined && fileOrBlobName.length > 33) {
fileOrBlobName = fileOrBlobName.slice(0, 19) + "..." + fileOrBlobName.slice(-14);
}
return fileOrBlobName;
},

text: {
defaultResponseError: "Upload failure reason unknown",
sizeSymbols: ["kB", "MB", "GB", "TB", "PB", "EB"]
},

deleteFile : {
enabled: false,
method: "DELETE",
endpoint: "/server/upload",
customHeaders: {},
params: {}
},

cors: {
expected: false,
sendCredentials: false,
allowXdr: false
},

blobs: {
defaultName: "misc_data"
},

paste: {
targetElement: null,
defaultName: "pasted_image"
},

camera: {
ios: false,

Expand Down

0 comments on commit 81b1dcc

Please sign in to comment.