From 7533676ae75b3c09178d4e99bbbf6bee30d13100 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 31 Jul 2019 13:49:29 +0200 Subject: Add support for images to the ext.php endpoint (#2465) --- p/ext.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'p/ext.php') diff --git a/p/ext.php b/p/ext.php index 1b123f47d..3035aae7d 100644 --- a/p/ext.php +++ b/p/ext.php @@ -59,6 +59,23 @@ case 'js': header('Content-Type: application/javascript; charset=UTF-8'); header('Content-Disposition: inline; filename="' . $file_name . '"'); break; +case 'png': + header('Content-Type: image/png'); + header('Content-Disposition: inline; filename="' . $file_name . '"'); + break; +case 'jpeg': +case 'jpg': + header('Content-Type: image/jpeg'); + header('Content-Disposition: inline; filename="' . $file_name . '"'); + break; +case 'gif': + header('Content-Type: image/gif'); + header('Content-Disposition: inline; filename="' . $file_name . '"'); + break; +case 'svg': + header('Content-Type: image/svg+xml'); + header('Content-Disposition: inline; filename="' . $file_name . '"'); + break; default: header('HTTP/1.1 400 Bad Request'); die(); -- cgit v1.2.3