mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Fix file upload size limit
This commit is contained in:
parent
03dfd56d3e
commit
5d1bffd2d7
@ -29,9 +29,9 @@ class etemplate_widget_file extends etemplate_widget
|
|||||||
// Legacy multiple - id ends in []
|
// Legacy multiple - id ends in []
|
||||||
if(substr($this->id,-2) == '[]')
|
if(substr($this->id,-2) == '[]')
|
||||||
{
|
{
|
||||||
$this->attrs['multiple'] = true;
|
$this->setElementAttribute($this->id, 'multiple', true);
|
||||||
}
|
}
|
||||||
$this->attrs['max_file_size'] = egw_vfs::int_size(ini_get('upload_max_filesize'));
|
$this->setElementAttribute($this->id, 'max_file_size', egw_vfs::int_size(ini_get('upload_max_filesize')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -276,7 +276,7 @@ var et2_file = et2_inputWidget.extend({
|
|||||||
if(this.input[0].files[index]) {
|
if(this.input[0].files[index]) {
|
||||||
var file = this.input[0].files[index];
|
var file = this.input[0].files[index];
|
||||||
if(file.size > this.options.max_file_size) {
|
if(file.size > this.options.max_file_size) {
|
||||||
error = this.egw().lang("File too large");
|
error = this.egw().lang("File too large. Maximum %1", et2_vfsSize.prototype.human_size(this.options.max_file_size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.progress)
|
if(this.progress)
|
||||||
|
Loading…
Reference in New Issue
Block a user