/** * Add files to the project * @return bool */ public function postAddFiles() { //Get the file $file = \Input::file('file'); //Get the project Id $project_id = \Input::get('project_id'); //Get the user id of the currently logged in user $userId = Sentry::getUser()->id; //Upload it to the disk $result = \Fileupload::upload($file, $project_id, 'project', $userId); return $result; }
/** * Upload files and add it to the task * @return JSON */ public function postAddFiles($taskId) { //Get the file $file = \Input::file('file'); //Get the user id of the currently logged in user $userId = Sentry::getUser()->id; //Upload the file $result = \Fileupload::upload($file, $taskId, 'task', $userId); return $result; }