We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fc106a commit 9def4f5Copy full SHA for 9def4f5
apps/dav/lib/Connector/Sabre/File.php
@@ -522,6 +522,15 @@ public function delete() {
522
public function getContentType() {
523
$mimeType = $this->info->getMimetype();
524
525
+ if ($mimeType === 'application/octet-stream') {
526
+ $mimeType = \OC::$server->getMimeTypeDetector()->detectPath($this->info->getInternalPath());
527
+ if ($this->info->getMimetype() !== $mimeType) {
528
+ $this->info->getStorage()->getCache()->update($this->info->getId(), [
529
+ 'mimetype' => $mimeType
530
+ ]);
531
+ }
532
533
+
534
// PROPFIND needs to return the correct mime type, for consistency with the web UI
535
if ($this->request->getMethod() === 'PROPFIND') {
536
return $mimeType;
0 commit comments