function _createObjectOperation() { $this->object->set('files_data', $_FILES[$this->name]); parent::_createObjectOperation(); if (catch_error('SQLException', $e)) { return throw_error($e); } elseif (catch_error('LimbException', $e)) { MessageBox::writeNotice('Some variations were not resized'); } elseif (catch_error('LimbException', $e)) { return throw_error($e); } }
protected function _createObjectOperation() { if (isset($_FILES[$this->name]['tmp_name']['file'])) { if ($_FILES[$this->name]['size']['file'] > ini_get('upload_max_filesize') * 1024 * 1024) { MessageBox::writeWarning('uploaded file size exceeds limit'); return false; } $this->object->set('tmp_file_path', $_FILES[$this->name]['tmp_name']['file']); $this->object->set('file_name', $_FILES[$this->name]['name']['file']); $this->object->set('mime_type', $_FILES[$this->name]['type']['file']); } return parent::_createObjectOperation(); }