Skip to content

content_type_for_path

def content_type_for_path(path: str) -> str

Guess a file’s content type from its extension.

Public because a caller uploading one file with AuraClient.upload_file needs the same answer deploy_from_folder gives; guessing differently would store the same file under two types.

Parameter Type Default Description
path str The file’s path; only its suffix is read.

A MIME type, falling back to application/octet-stream.