id); if ($objectFile) { if ($objectFile->file_content_type == 1 && $objectFile->extension == 'pdf') { if(empty($_GET['preview'])) { return $this->renderPartial('pdf-preview', ['objectFile' => $objectFile]); } else { return $this->renderPartial('viewer', ['objectFile' => $objectFile]); } } } } // die('You do not have permission to open this address'); } public function actionFilePreviewDeliveryMobile($id) { return $this->renderPartial('pdf-preview-mobile', ['id' => $id]); // die('You do not have permission to open this address'); } public function actionPublic($id) { return $this->renderPartial('pdf-public-preview', ['file_name' => $id]); } public function actionDelivery($id) { $file = RegisterObjectFiles::findOne($id); IdServer::url($file->file_url); exit; } public function actionDeliveryImg($id) { $file = RegisterObjectFiles::findOne($id); IdServer::url($file->file_url); exit; } public function actionVideoThumb($id) { $file = RegisterObjectFiles::findOne($id); IdServer::url($file->video_thumbnail); exit; } public function actionStream($id) { $file = RegisterObjectFiles::findOne($id); echo $file->streaming_url; exit; } }