Advertisement
lorrenec

Untitled

Aug 11th, 2022
873
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. $file_name = $files["select_file"]["name"];
  2. $dest = JPATH_ROOT . "/uploads/firedrive/" . uniqid("", true) . "/" . JFile::makeSafe(JFile::getName($file_name));
  3. $data["file_name"] = JFile::upload($files["select_file"]["tmp_name"], $dest) ? $dest : false;
  4.  
  5. if (!$data["file_name"]) {
  6. JFactory::getApplication()->enqueueMessage(JText::_('COM_FIREDRIVE_FILE_UPLOAD_ERROR_MESSAGE'), 'error');
  7. parent::save($key, $urlVar);
  8.  
  9. return;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement