Fix file upload size limit

This commit is contained in:
Nathan Gray 2012-05-22 20:44:06 +00:00
parent 03dfd56d3e
commit 5d1bffd2d7
2 changed files with 3 additions and 3 deletions

View File

@ -29,9 +29,9 @@ class etemplate_widget_file extends etemplate_widget
// Legacy multiple - id ends in []
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')));
}
/**

View File

@ -276,7 +276,7 @@ var et2_file = et2_inputWidget.extend({
if(this.input[0].files[index]) {
var file = this.input[0].files[index];
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)