We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cd583c1 + ad46a63 commit 00863e2Copy full SHA for 00863e2
apps/dav/lib/Connector/Sabre/File.php
@@ -567,6 +567,15 @@ public function delete() {
567
public function getContentType() {
568
$mimeType = $this->info->getMimetype();
569
570
+ if ($mimeType === 'application/octet-stream') {
571
+ $mimeType = \OC::$server->getMimeTypeDetector()->detectPath($this->info->getInternalPath());
572
+ if ($this->info->getMimetype() !== $mimeType) {
573
+ $this->info->getStorage()->getCache()->update($this->info->getId(), [
574
+ 'mimetype' => $mimeType
575
+ ]);
576
+ }
577
578
+
579
// PROPFIND needs to return the correct mime type, for consistency with the web UI
580
if ($this->request->getMethod() === 'PROPFIND') {
581
return $mimeType;
0 commit comments