mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
plupload wasn't displaying upload errors correctly.
This commit is contained in:
@@ -676,10 +676,10 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
||||
|
||||
// Specify what files to browse for
|
||||
filters: [
|
||||
{title: "Image files", extensions: extImg || "jpg,gif,png,jpeg"},
|
||||
{title: "Image files", extensions: extImg || "jpg,gif,png,jpeg,svg"},
|
||||
{title: "Zip files", extensions: extArchive || "zip,gz,rar"},
|
||||
{title: "Document files", extensions: extDoc || "pdf,doc,docx,xls,xlsm,xml"},
|
||||
{title: "Media files", extensions: 'mp3,mp4,wav,ogg,webm,mid,midi,'},
|
||||
{title: "Media files", extensions: 'mp3,mp4,wav,ogg,webm,mid,midi'},
|
||||
{title: "Other files", extensions: 'torrent,txt'}
|
||||
],
|
||||
preinit: {
|
||||
@@ -693,9 +693,20 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
||||
{
|
||||
|
||||
},
|
||||
FileUploaded: function (up, file, info)
|
||||
FileUploaded: function (up, file, info) // Called when a file has finished uploading
|
||||
{
|
||||
// Called when a file has finished uploading
|
||||
// console.log(up);
|
||||
// console.log(file);
|
||||
// console.log(file);
|
||||
var result = JSON.parse(info.response);
|
||||
if(result.error)
|
||||
{
|
||||
alert(file.name + ': '+ result.error.message);
|
||||
// $('.plupload_buttons').show();
|
||||
return false;
|
||||
}
|
||||
// console.log(result);
|
||||
|
||||
},
|
||||
UploadProgress: function (up, file)
|
||||
{
|
||||
|
Reference in New Issue
Block a user