summaryrefslogtreecommitdiffstats
path: root/application/helpers
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-03-02 12:14:58 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-03-02 12:14:58 +0100
commite9e9e635b337dc46111cdf95ccb16b7d28deb849 (patch)
treec69c6e12c48f71306cf54640b24b8c133f793090 /application/helpers
parentea8471781ee26f79c3835e68b31353601e78d0a8 (diff)
Add imagemagick support
Adds additional support for imagemagick if GD doesn't support a file type and extends the files displayed as thumbnails to all images and pdf files. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/helpers')
-rw-r--r--application/helpers/filebin_helper.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php
index a1b540b1d..2604cfe4e 100644
--- a/application/helpers/filebin_helper.php
+++ b/application/helpers/filebin_helper.php
@@ -300,4 +300,12 @@ function cache_function($key, $ttl, $function)
return $content;
}
+// Return mimetype of file
+function mimetype($file) {
+ $fileinfo = new finfo(FILEINFO_MIME_TYPE);
+ $mimetype = $fileinfo->file($file);
+
+ return $mimetype;
+}
+
# vim: set noet: