mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 06:39:56 +09:00
jQuery file upload 업데이트
- IE8에서 동작하지 않을 수 있는 문제 해결
This commit is contained in:
parent
4492da9bbd
commit
ec5a496327
3 changed files with 20 additions and 15 deletions
|
|
@ -37,7 +37,7 @@
|
|||
// send Blob objects via XHR requests:
|
||||
disableImageResize: /Android(?!.*Chrome)|Opera/
|
||||
.test(window.navigator.userAgent),
|
||||
maxFileSize: 5000000,
|
||||
maxFileSize: 999000,
|
||||
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@
|
|||
blob.name = file.name;
|
||||
} else if (file.name) {
|
||||
blob.name = file.name.replace(
|
||||
/\..+$/,
|
||||
/\.\w+$/,
|
||||
'.' + blob.type.substr(6)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* jQuery File Upload Plugin 5.42.2
|
||||
* jQuery File Upload Plugin 5.42.3
|
||||
* https://github.com/blueimp/jQuery-File-Upload
|
||||
*
|
||||
* Copyright 2010, Sebastian Tschan
|
||||
|
|
@ -277,7 +277,8 @@
|
|||
// The following are jQuery ajax settings required for the file uploads:
|
||||
processData: false,
|
||||
contentType: false,
|
||||
cache: false
|
||||
cache: false,
|
||||
timeout: 0
|
||||
},
|
||||
|
||||
// A list of options that require reinitializing event listeners and/or
|
||||
|
|
@ -983,7 +984,10 @@
|
|||
fileSet,
|
||||
i,
|
||||
j = 0;
|
||||
if (limitSize && (!filesLength || files[0].size === undefined)) {
|
||||
if (!filesLength) {
|
||||
return false;
|
||||
}
|
||||
if (limitSize && files[0].size === undefined) {
|
||||
limitSize = undefined;
|
||||
}
|
||||
if (!(options.singleFileUploads || limit || limitSize) ||
|
||||
|
|
@ -1344,18 +1348,19 @@
|
|||
_initDataAttributes: function () {
|
||||
var that = this,
|
||||
options = this.options,
|
||||
clone = $(this.element[0].cloneNode(false)),
|
||||
data = clone.data();
|
||||
// Avoid memory leaks:
|
||||
clone.remove();
|
||||
data = this.element.data();
|
||||
// Initialize options set via HTML5 data-attributes:
|
||||
$.each(
|
||||
data,
|
||||
function (key, value) {
|
||||
var dataAttributeName = 'data-' +
|
||||
// Convert camelCase to hyphen-ated key:
|
||||
key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
if (clone.attr(dataAttributeName)) {
|
||||
this.element[0].attributes,
|
||||
function (index, attr) {
|
||||
var key = attr.name.toLowerCase(),
|
||||
value;
|
||||
if (/^data-/.test(key)) {
|
||||
// Convert hyphen-ated key to camelCase:
|
||||
key = key.slice(5).replace(/-[a-z]/g, function (str) {
|
||||
return str.charAt(1).toUpperCase();
|
||||
});
|
||||
value = data[key];
|
||||
if (that._isRegExpOption(key, value)) {
|
||||
value = that._getRegExp(value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue