We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2445190 commit 46b2c8fCopy full SHA for 46b2c8f
dlt/common/storages/fsspec_filesystem.py
@@ -236,10 +236,12 @@ def read_bytes(self) -> bytes:
236
237
238
def guess_mime_type(file_name: str) -> Sequence[str]:
239
- return mimetypes.guess_type(posixpath.basename(file_name), strict=False) or (
240
- "application/" + (posixpath.splitext(file_name)[1][1:] or "octet-stream"),
241
- None,
242
- )
+ type_ = list(mimetypes.guess_type(posixpath.basename(file_name), strict=False))
+
+ if not type_[0]:
+ type_[0] = "application/" + (posixpath.splitext(file_name)[1][1:] or "octet-stream")
243
244
+ return type_
245
246
247
def glob_files(
0 commit comments