in components/processing/libs/processor-base/src/processors/base/gcsio.py [0:0]
def get_mimetype(path: str) -> str:
"""Infer the mimetype of a path
Returns application/octet-stream if it fails.
"""
if path.lower().endswith(".md"):
return "text/plain"
mime_type = mimetypes.guess_type(path)[0]
if mime_type:
return mime_type
return "application/octet-stream"