in sam-code/img_api/app.py [0:0]
def get_mime_type(accept_string):
# Accept string is a comma separated list of preferences. Find first one we can handle
for option in accept_string.split(","):
mime_type = option.split(";")[0]
if mime_type == "*/*":
mime_type = "image/jpeg"
if mime_type in known_conversions:
return mime_type
return "unknown/unknown"