diff --git a/build/index.php b/build/index.php
index b1ae0a2..d764937 100644
--- a/build/index.php
+++ b/build/index.php
@@ -2506,9 +2506,10 @@ register_module([
File Information
Name | " . str_replace("File/", "", $filepath) . " |
---|
Type | $mime_type |
- Size | " . human_filesize(filesize($filepath)) . " |
- Original dimensions | $dimensions[0] x $dimensions[1] |
- Uploaded by | " . $pageindex->{$env->page}->lasteditor . " |
---|
+ Size | " . human_filesize(filesize($filepath)) . " |
";
+ if(substr($mime_type, strpos($mime_type, "/")) == "image")
+ $preview_html .= "Original dimensions | $dimensions[0] x $dimensions[1] |
";
+ $preview_html .= "Uploaded by | " . $pageindex->{$env->page}->lasteditor . " |
Description
";
$parts["{content}"] = str_replace("", "\n$preview_html", $parts["{content}"]);
diff --git a/module_index.json b/module_index.json
index 3996b94..55b314b 100644
--- a/module_index.json
+++ b/module_index.json
@@ -68,7 +68,7 @@
"author": "Starbeamrainbowlabs",
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.",
"id": "feature-upload",
- "lastupdate": 1459605921,
+ "lastupdate": 1459606415,
"optional": false
},
{
diff --git a/modules/feature-upload.php b/modules/feature-upload.php
index bf276a8..35c490c 100644
--- a/modules/feature-upload.php
+++ b/modules/feature-upload.php
@@ -278,9 +278,10 @@ register_module([
File Information
Name | " . str_replace("File/", "", $filepath) . " |
---|
Type | $mime_type |
- Size | " . human_filesize(filesize($filepath)) . " |
- Original dimensions | $dimensions[0] x $dimensions[1] |
- Uploaded by | " . $pageindex->{$env->page}->lasteditor . " |
---|
+ Size | " . human_filesize(filesize($filepath)) . " |
";
+ if(substr($mime_type, strpos($mime_type, "/")) == "image")
+ $preview_html .= "Original dimensions | $dimensions[0] x $dimensions[1] |
";
+ $preview_html .= "Uploaded by | " . $pageindex->{$env->page}->lasteditor . " |
Description
";
$parts["{content}"] = str_replace("", "\n$preview_html", $parts["{content}"]);