"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
serve dlna: fix MIME type if backend can't identify it
Nick Craig-Wood85c29e36299c
diff --git a/cmd/serve/dlna/cds.go b/cmd/serve/dlna/cds.goindex f7cd77d1f..72fcceeab 100644--- a/cmd/serve/dlna/cds.go+++ b/cmd/serve/dlna/cds.go@@ -60,6 +60,11 @@ func (cds *contentDirectoryService) cdsObjectToUpnpavObject(cdsObject object, fivar mimeType stringif o, ok := fileInfo.DirEntry().(fs.Object); ok {mimeType = fs.MimeType(context.TODO(), o)+ // If backend doesn't know what the mime type is then+ // try getting it from the file name+ if mimeType == "application/octet-stream" {+ mimeType = fs.MimeTypeFromName(fileInfo.Name())+ }} else {mimeType = fs.MimeTypeFromName(fileInfo.Name())}