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