mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 19:01:42 +00:00
Changed user avatar upload
This commit is contained in:
@@ -52,16 +52,17 @@ $('#upload-file-form .submit').click(function () {
|
||||
return false;
|
||||
}
|
||||
|
||||
var total = 0;
|
||||
$.each($('#upload-file-form input[type=file]'), function() {
|
||||
if($(this).val()) {
|
||||
total += this.files[0].size;
|
||||
if (this.files) {
|
||||
var total = 0;
|
||||
$.each($('#upload-file-form input[type=file]'), function() {
|
||||
if($(this).val()) {
|
||||
total += this.files[0].size;
|
||||
}
|
||||
});
|
||||
if (total > {{ max_upload_file_size }}) {
|
||||
$('#upload-file-form .error').html('{% trans "File size surpasses the limit." %}').removeClass('hide');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (total > {{ max_upload_file_size }}) {
|
||||
$('#upload-file-form .error').html('{% trans "File size surpasses the limit." %}').removeClass('hide');
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#upload-file-form .error').addClass('hide');
|
||||
|
Reference in New Issue
Block a user