mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-31 19:19:43 +01:00
fixed error when filename included non-ascii chars (eg. German umlauts) and added a header with information about author and Github url
This commit is contained in:
parent
d9f8160fff
commit
fcc1737036
@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* jquery-html5-upload
|
||||||
|
*
|
||||||
|
* @author Mikhail Dektyarev <mihail.dektyarow@gmail.com>
|
||||||
|
* @link https://github.com/mihaild/jquery-html5-upload
|
||||||
|
*/
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
jQuery.fn.html5_upload = function(options) {
|
jQuery.fn.html5_upload = function(options) {
|
||||||
|
|
||||||
@ -36,8 +43,8 @@
|
|||||||
headers: {
|
headers: {
|
||||||
"Cache-Control":"no-cache",
|
"Cache-Control":"no-cache",
|
||||||
"X-Requested-With":"XMLHttpRequest",
|
"X-Requested-With":"XMLHttpRequest",
|
||||||
"X-File-Name": function(file){return file.fileName ? file.fileName : file.name},
|
"X-File-Name": function(file){return encodeURIComponent(file.fileName ? file.fileName : file.name);},
|
||||||
"X-File-Size": function(file){return file.fileSize ? file.fileSize : file.size},
|
"X-File-Size": function(file){return file.fileSize ? file.fileSize : file.size;},
|
||||||
"Content-Type": function(file){
|
"Content-Type": function(file){
|
||||||
if (!options.sendBoundary) return 'multipart/form-data';
|
if (!options.sendBoundary) return 'multipart/form-data';
|
||||||
return false;
|
return false;
|
||||||
@ -175,7 +182,7 @@
|
|||||||
builder += crlf;
|
builder += crlf;
|
||||||
|
|
||||||
// Give eGW a chance to interfere
|
// Give eGW a chance to interfere
|
||||||
if(typeof(options.beforeSend) == "function") {
|
if(typeof(options.beforeSend) == "function") {
|
||||||
builder += dashdash;
|
builder += dashdash;
|
||||||
builder += boundary;
|
builder += boundary;
|
||||||
builder += crlf;
|
builder += crlf;
|
||||||
|
Loading…
Reference in New Issue
Block a user