$data['size'] = (int)$data['size'];
$data['mtime'] = (int)$data['mtime'];
$data['encrypted'] = (bool)$data['encrypted'];
+ $data['mimetype'] = $this->getMimetype($data['mimetype']);
+ $data['mimepart'] = $this->getMimetype($data['mimepart']);
return $data;
}
return false;
*/
public function getFolderContents($folder) {
if ($folder == '') {
- return \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_GET_FOLDER_CONTENTS);
+ $files = \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_GET_FOLDER_CONTENTS);
+ foreach ($files as &$file) {
+ $file['mimetype'] = $this->getMimetype($file['mimetype']);
+ $file['mimepart'] = $this->getMimetype($file['mimepart']);
+ }
+ return $files;
} else {
if ($cache = $this->getSourceCache($folder)) {
return $cache->getFolderContents($this->files[$folder]);