summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoricewind1991 <robin@icewind.nl>2014-06-05 10:29:03 +0200
committericewind1991 <robin@icewind.nl>2014-06-05 10:29:03 +0200
commit09cc7c2d4436f9e85dc70a7cf22a105b63cb53c1 (patch)
tree127163ac1f5ee98fe4843b8254c839e0f6d52f44
parent71b86136c2de2506c397f39ddaae3552d4061cdd (diff)
parentc88509902ec8443cedcd2b3ddea025a498b4a18a (diff)
downloadnextcloud-server-09cc7c2d4436f9e85dc70a7cf22a105b63cb53c1.tar.gz
nextcloud-server-09cc7c2d4436f9e85dc70a7cf22a105b63cb53c1.zip
Merge pull request #8862 from owncloud/share-overview-fixmimetype
Fix mime type returning for shared with others files
-rw-r--r--apps/files_sharing/lib/api.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index 956a8774150..2e824a4a9df 100644
--- a/apps/files_sharing/lib/api.php
+++ b/apps/files_sharing/lib/api.php
@@ -58,10 +58,8 @@ class Api {
return new \OC_OCS_Result(null, 404, 'could not get shares');
} else {
foreach ($shares as &$share) {
- // file_target might not be set if the target user hasn't mounted
- // the filesystem yet
- if ($share['item_type'] === 'file' && isset($share['file_target'])) {
- $share['mimetype'] = \OC_Helper::getFileNameMimeType($share['file_target']);
+ if ($share['item_type'] === 'file' && isset($share['path'])) {
+ $share['mimetype'] = \OC_Helper::getFileNameMimeType($share['path']);
}
$newShares[] = $share;
}