aboutsummaryrefslogtreecommitdiffstats
path: root/addon/js_upload
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-07-06 17:26:04 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-07-06 17:26:04 +0200
commit5526afcf76c261ac8f276ffc4121861d6e175d70 (patch)
treeffb71bb97b81a5a1650d0904d31505665f3ebac0 /addon/js_upload
parent23c9af5b26de9b235632678a5486512e52363603 (diff)
downloadvolse-hubzilla-5526afcf76c261ac8f276ffc4121861d6e175d70.tar.gz
volse-hubzilla-5526afcf76c261ac8f276ffc4121861d6e175d70.tar.bz2
volse-hubzilla-5526afcf76c261ac8f276ffc4121861d6e175d70.zip
let js_upload addon be aware of upload image size limit, and return message to user in case of error
Diffstat (limited to 'addon/js_upload')
-rw-r--r--addon/js_upload/js_upload.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/addon/js_upload/js_upload.php b/addon/js_upload/js_upload.php
index 042e9a988..8691389fe 100644
--- a/addon/js_upload/js_upload.php
+++ b/addon/js_upload/js_upload.php
@@ -129,7 +129,7 @@ function js_upload_post_init(&$a,&$b) {
// max file size in bytes
- $sizeLimit = 6 * 1024 * 1024;
+ $sizeLimit = get_config('system','maximagesize'); //6 * 1024 * 1024;
$uploader = new qqFileUploader($allowedExtensions, $sizeLimit);
@@ -141,6 +141,7 @@ function js_upload_post_init(&$a,&$b) {
if(isset($result['error'])) {
logger('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'] , 'LOGGER_DEBUG');
+ echo json_encode($result);
killme();
}