Skip to content
Snippets Groups Projects
Commit 09cc7c2d authored by Robin Appelman's avatar Robin Appelman
Browse files

Merge pull request #8862 from owncloud/share-overview-fixmimetype

Fix mime type returning for shared with others files
parents 71b86136 c8850990
Branches
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment