summaryrefslogtreecommitdiffstats
path: root/application/service
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-09-20 11:06:44 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-09-20 11:09:03 +0200
commitf4c47ee5b72f6074827cc86b28d0ab4031be7237 (patch)
tree3ce69531ccc7d9a51bab738089a12adb5634518e /application/service
parent1c302ee79174818b996bd4bb4418bbd320e2a1d1 (diff)
API 2.1: Add thumbnail link to history
Also adjust test cases to check for the new value. API v1 does not change. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/service')
-rw-r--r--application/service/files.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/application/service/files.php b/application/service/files.php
index 7cef73d97..adc62c7dc 100644
--- a/application/service/files.php
+++ b/application/service/files.php
@@ -24,6 +24,9 @@ class files {
->where('user', $user)
->get()->result_array();
foreach ($query as $key => $item) {
+ if (\libraries\Image::type_supported($item["mimetype"])) {
+ $item['thumbnail'] = site_url("file/thumbnail/".$item['id']);
+ }
$items[$item["id"]] = $item;
}