From 77a0feb46f0cd500b9e7f9dbef894061d147d1e3 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 30 Dec 2020 01:13:53 +0530 Subject: [PATCH] fix: deprecate option --- app/controllers/api/storage.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 0fcb225c7..b7628e320 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -425,10 +425,9 @@ App::get('/v1/storage/files/:fileId/view') ->label('sdk.response.type', '*/*') ->label('sdk.methodType', 'location') ->param('fileId', '', new UID(), 'File unique ID.') - ->param('as', '', new WhiteList(['pdf', /*'html',*/ 'text'], true), 'Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk.', true) ->inject('response') ->inject('projectDB') - ->action(function ($fileId, $as, $response, $projectDB) { + ->action(function ($fileId, $response, $projectDB) { /** @var Appwrite\Utopia\Response $response */ /** @var Appwrite\Database\Database $projectDB */ @@ -470,13 +469,6 @@ App::get('/v1/storage/files/:fileId/view') $output = $compressor->decompress($source); $fileName = $file->getAttribute('name', ''); - $contentTypes = [ - 'pdf' => 'application/pdf', - 'text' => 'text/plain', - ]; - - $contentType = (\array_key_exists($as, $contentTypes)) ? $contentTypes[$as] : $contentType; - // Response $response ->setContentType($contentType)