summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gallery/views/simple_uploader.html.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php
index 5eb9a2ce..81e8c437 100644
--- a/modules/gallery/views/simple_uploader.html.php
+++ b/modules/gallery/views/simple_uploader.html.php
@@ -80,7 +80,7 @@
"user_agent": "<?= Input::instance()->server("HTTP_USER_AGENT") ?>",
"csrf": "<?= $csrf ?>"
},
- file_size_limit : "<?= ini_get("upload_max_filesize") ? num::convert_to_bytes(ini_get("upload_max_filesize")) : "100M" ?>",
+ file_size_limit : "<?= ini_get("upload_max_filesize") ? num::convert_to_bytes(ini_get("upload_max_filesize"))."B" : "100MB" ?>",
file_types : "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4",
file_types_description : "<?= t("Photos and Movies") ?>",
file_upload_limit : 1000,
@@ -149,16 +149,20 @@
var fp = new File_Progress(file);
switch (error_code) {
case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
- fp.set_status("error", "<?= t("File is too big.") ?>");
+ fp.title.html(file.name);
+ fp.set_status("error", "<strong><?= t("File is too big.") ?></strong> <?= t("A likely error source is a too low value for") ?> <br /> <em>upload_max_filesize</em> (<?= ini_get('upload_max_filesize') ?>) <?= t("in your") ?> <em>php.ini</em>.");
break;
case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
+ fp.title.html(file.name);
fp.set_status("error", "<?= t("Cannot upload empty files.") ?>");
break;
case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
+ fp.title.html(file.name);
fp.set_status("error", "<?= t("Invalid file type.") ?>");
break;
default:
if (file !== null) {
+ fp.title.html(file.name);
fp.set_status("error", "<?= t("Unknown error") ?>");
}
break;