v3: simplify mimetypes
closes #136 (closed).
- remove usage of
ctx.file.mime
, always use libmagic's mimetype - add
ctx.resolve_mime()
go have a tuple containing mime and extension to use - make upload helper classes be dataclasses instead of namedtuples
- use 1kB instead of 512 bytes for libmagic handover
- add
FORCE_EXTENSION
so all files of a given mime go to a given extension (all jpeg images are.jpg
) - add
INCLUDE_EXTENSION
so we can add our own extensions to specific mimes (anyapplication/octet-stream
files can have an empty extension) - ensure file stream is coherent when calculating hashes
- remove some app parameters
Edited by luna