public function proccessField(\Meta\Form $form) { // move the uploaded file to the files directory if ($this->uploadedFile()) { if (!$this->hasErrors()) { $tmpName = $_FILES[$this->altName()]['tmp_name']; $file = \Meta\FileSystem::getFilesPath() . '/' . $this->getValue(); move_uploaded_file($tmpName, $file); } } parent::proccessField($form); }
public function getFullPath() { return \Meta\FileSystem::getFilesPath() . '/' . $this->name; }
public static function init() { if (!is_writable(\Meta\FileSystem::getFilesPath())) { \Meta\Flash::warning(t('The file system directory is not writable. To set permission, type: <b>chmod 777 ' . \Meta\FileSystem::getFilesPath() . ' -R</b>')); } }