From dff982afc691286d3e590e37c62b7f07d0b83f7c Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Sun, 2 Dec 2007 21:38:28 +0000 Subject: [PATCH] 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 --- javascript/Upload.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/Upload.js b/javascript/Upload.js index d6698847..b1992b31 100644 --- a/javascript/Upload.js +++ b/javascript/Upload.js @@ -161,13 +161,13 @@ Upload.prototype = { this.swfu.cancelQueue(); switch(error_code) { 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; 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; 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; case SWFUpload.ERROR_CODE_FILE_EXCEEDS_SIZE_LIMIT: alert('Files cannot be bigger than ' + this.fileSizeLimit/1024 + ' MB.');