From 7767435f829f6e945372d1c39139271bfc64ce69 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 16 Nov 2025 17:59:16 +0500 Subject: feat: ZIP web applications --- public/upload.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'public/upload.php') diff --git a/public/upload.php b/public/upload.php index bfa1990..6eda3c6 100644 --- a/public/upload.php +++ b/public/upload.php @@ -214,6 +214,18 @@ try { unlink($input_path); } + if ( + ZIPWEBAPP_ENABLE && + $file_data["extension"] === "zip" && + parse_zip_web_archive( + $file_path, + sprintf("%s/%s", FILE_UPLOAD_DIRECTORY, $file_id), + ) + ) { + $file_data["extension"] = "html"; + $file_data["mime"] = "text/html"; + } + $file_data['size'] = filesize($file_path); if (FILE_THUMBNAILS && !is_dir(FILE_THUMBNAIL_DIRECTORY) && !mkdir(FILE_THUMBNAIL_DIRECTORY, 0777, true)) { -- cgit v1.2.3