please add asserts to check `filename` and `mime_type`