mirror of
https://github.com/friendica/friendica
synced 2024-12-23 05:20:15 +00:00
let js_upload addon be aware of upload image size limit, and return message to user in case of error
This commit is contained in:
parent
23c9af5b26
commit
5526afcf76
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue