mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Better upload error messages (merged from branches/2.2.0@45907, r45463)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@46120 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9037878a5b
commit
dff982afc6
@ -161,13 +161,13 @@ Upload.prototype = {
|
|||||||
this.swfu.cancelQueue();
|
this.swfu.cancelQueue();
|
||||||
switch(error_code) {
|
switch(error_code) {
|
||||||
case SWFUpload.ERROR_CODE_HTTP_ERROR:
|
case SWFUpload.ERROR_CODE_HTTP_ERROR:
|
||||||
alert('You have encountered an error. File hasn\'t been uploaded. Please hit the "Refresh" button in your web browser');
|
alert('You have encountered an error. File hasn\'t been uploaded. Please hit the "Refresh" button in your web browser. Error Code: HTTP Error, File name: ' + file.name + ', Message: ' + msg);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.ERROR_CODE_IO_ERROR:
|
case SWFUpload.ERROR_CODE_IO_ERROR:
|
||||||
alert('You have encountered an error. File hasn\'t been uploaded. Please hit the "Refresh" button in your web browser');
|
alert('You have encountered an error. File hasn\'t been uploaded. Please hit the "Refresh" button in your web browser. Error Code: IO Error, File name: ' + file.name + ', Message: ' + msg);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.ERROR_CODE_SECURITY_ERROR:
|
case SWFUpload.ERROR_CODE_SECURITY_ERROR:
|
||||||
alert('You have encountered an error. File hasn\'t been uploaded. Please hit the "Refresh" button in your web browser');
|
alert('You have encountered an error. File hasn\'t been uploaded. Please hit the "Refresh" button in your web browser. Error Code: Security Error, File name: ' + file.name + ', Message: ' + msg);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.ERROR_CODE_FILE_EXCEEDS_SIZE_LIMIT:
|
case SWFUpload.ERROR_CODE_FILE_EXCEEDS_SIZE_LIMIT:
|
||||||
alert('Files cannot be bigger than ' + this.fileSizeLimit/1024 + ' MB.');
|
alert('Files cannot be bigger than ' + this.fileSizeLimit/1024 + ' MB.');
|
||||||
|
Loading…
Reference in New Issue
Block a user