Contextual upload error message
This commit is contained in:
parent
4b081be956
commit
5ddd85ff9c
1 changed files with 2 additions and 2 deletions
|
@ -236,13 +236,13 @@ $(document).ready(function() {
|
|||
// check PHP upload limit
|
||||
if (selection.totalBytes > $('#upload_limit').val()) {
|
||||
data.textStatus = 'sizeexceedlimit';
|
||||
data.errorThrown = t('files', 'File size exceeds upload limit');
|
||||
data.errorThrown = t('files', 'Total file size {size1} exceeds upload limit {size2}').replace('{size1}', humanFileSize(selection.totalBytes)).replace('{size2}', humanFileSize($('#upload_limit').val()));
|
||||
}
|
||||
|
||||
// check free space
|
||||
if (selection.totalBytes > $('#free_space').val()) {
|
||||
data.textStatus = 'notenoughspace';
|
||||
data.errorThrown = t('files', 'Not enough free space');
|
||||
data.errorThrown = t('files', 'Not enough free space, you are uploading {size1} but only {size2} is left').replace('{size1}', humanFileSize(selection.totalBytes)).replace('{size2}', humanFileSize($('#free_space').val()));
|
||||
}
|
||||
|
||||
// end upload for whole selection on error
|
||||
|
|
Loading…
Reference in a new issue