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