Merge pull request #8862 from owncloud/share-overview-fixmimetype
Fix mime type returning for shared with others files
This commit is contained in:
commit
09cc7c2d44
|
@ -58,10 +58,8 @@ class Api {
|
||||||
return new \OC_OCS_Result(null, 404, 'could not get shares');
|
return new \OC_OCS_Result(null, 404, 'could not get shares');
|
||||||
} else {
|
} else {
|
||||||
foreach ($shares as &$share) {
|
foreach ($shares as &$share) {
|
||||||
// file_target might not be set if the target user hasn't mounted
|
if ($share['item_type'] === 'file' && isset($share['path'])) {
|
||||||
// the filesystem yet
|
$share['mimetype'] = \OC_Helper::getFileNameMimeType($share['path']);
|
||||||
if ($share['item_type'] === 'file' && isset($share['file_target'])) {
|
|
||||||
$share['mimetype'] = \OC_Helper::getFileNameMimeType($share['file_target']);
|
|
||||||
}
|
}
|
||||||
$newShares[] = $share;
|
$newShares[] = $share;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue