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 52b99d8 commit fd630c9Copy full SHA for fd630c9
apps/dav/lib/Connector/Sabre/File.php
@@ -524,6 +524,15 @@ public function delete() {
524
public function getContentType() {
525
$mimeType = $this->info->getMimetype();
526
527
+ if ($mimeType === 'application/octet-stream') {
528
+ $mimeType = \OC::$server->getMimeTypeDetector()->detectPath($this->info->getInternalPath());
529
+ if ($this->info->getMimetype() !== $mimeType) {
530
+ $this->info->getStorage()->getCache()->update($this->info->getId(), [
531
+ 'mimetype' => $mimeType
532
+ ]);
533
+ }
534
535
+
536
// PROPFIND needs to return the correct mime type, for consistency with the web UI
537
if ($this->request->getMethod() === 'PROPFIND') {
538
return $mimeType;
0 commit comments