We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e233c73 commit 88d6f51Copy full SHA for 88d6f51
apps/dav/lib/Connector/Sabre/File.php
@@ -563,6 +563,15 @@ public function delete() {
563
public function getContentType() {
564
$mimeType = $this->info->getMimetype();
565
566
+ if ($mimeType === 'application/octet-stream') {
567
+ $mimeType = \OC::$server->getMimeTypeDetector()->detectPath($this->info->getInternalPath());
568
+ if ($this->info->getMimetype() !== $mimeType) {
569
+ $this->info->getStorage()->getCache()->update($this->info->getId(), [
570
+ 'mimetype' => $mimeType
571
+ ]);
572
+ }
573
574
+
575
// PROPFIND needs to return the correct mime type, for consistency with the web UI
576
if ($this->request->getMethod() === 'PROPFIND') {
577
return $mimeType;
0 commit comments