Skip to content
Snippets Groups Projects
Commit ee77ef86 authored by Bart Visscher's avatar Bart Visscher
Browse files

Check mimetype filter in file share backend

parent 4f4498e0
Branches
No related tags found
No related merge requests found
...@@ -72,8 +72,14 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { ...@@ -72,8 +72,14 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
// Only 1 item should come through for this format call // Only 1 item should come through for this format call
return array('path' => $items[key($items)]['path'], 'permissions' => $items[key($items)]['permissions']); return array('path' => $items[key($items)]['path'], 'permissions' => $items[key($items)]['permissions']);
} else if ($format == self::FORMAT_FILE_APP) { } else if ($format == self::FORMAT_FILE_APP) {
if (isset($parameters['mimetype_filter'])) {
$mimetype_filter = $parameters['mimetype_filter'];
}
$files = array(); $files = array();
foreach ($items as $item) { foreach ($items as $item) {
if (isset($mimetype_filter) && strpos($item['mimetype'], $mimetype_filter) !== 0) {
continue;
}
$file = array(); $file = array();
$file['id'] = $item['file_source']; $file['id'] = $item['file_source'];
$file['path'] = $item['file_target']; $file['path'] = $item['file_target'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment