From 4ff15329b28c69c52103ddfa17603684f313e206 Mon Sep 17 00:00:00 2001 From: Inductiveload Date: Fri, 9 Apr 2021 18:25:17 +0100 Subject: [PATCH] Make DJVU the default Firstly DJVU is often easier to work with at Wikisource than PDF, the thumbnails render much faster and the text layer is generally better. Also a massive PDF upload means it's highly likely that a user is looking to upload a DVJU in preference to the PDF (if they wanted a PDF, that's probably already at Commons). --- src/Controller/UploadController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/UploadController.php b/src/Controller/UploadController.php index ba72f12..49b4eb2 100644 --- a/src/Controller/UploadController.php +++ b/src/Controller/UploadController.php @@ -185,7 +185,7 @@ public function fill( Request $request, Response $response ) { $query = $request->getQueryParams(); $iaId = trim( $query['iaId'] ?? '' ); $commonsName = $this->commonsClient->normalizePageTitle( $query['commonsName'] ?? '' ); - $format = $query['format'] ?? 'pdf'; + $format = $query['format'] ?? 'djvu'; $fileSource = $query['fileSource'] ?? 'djvu'; // Validate inputs. if ( $iaId === '' || $commonsName === '' ) { @@ -464,7 +464,7 @@ protected function outputsInitTemplate( array $params, Response $response ) { 'iaId' => '', 'commonsName' => '', 'jobs' => [], - 'format' => 'pdf', + 'format' => 'djvu', 'wiki_base_url' => $this->config['wiki_base_url'], ]; $params = array_merge( $defaultParams, $params );