public function run() { if (!kernel()->currentUser->hasLoggedIn()) { return $this->error('無上傳權限。'); } parent::run(); $filePath = $this->arg('file'); $session = kernel()->session; $session->set('_current_upload', $filePath); return $this->success('上傳成功', ['filepath' => $filePath]); }