diff options
| author | ilotterytea <iltsu@alright.party> | 2025-11-16 17:59:16 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-11-16 17:59:16 +0500 |
| commit | 7767435f829f6e945372d1c39139271bfc64ce69 (patch) | |
| tree | 71450e41b72fe4746d6b1f766a3a8213c9784878 /public/upload.php | |
| parent | c80ae4c0aab66a2e9b527ca983fa6ed772a98a87 (diff) | |
Diffstat (limited to 'public/upload.php')
| -rw-r--r-- | public/upload.php | 12 |
1 files changed, 12 insertions, 0 deletions
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)) { |
