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