We're using uploaded_file.content_type.startswith('image/'), which fails with an AttributeError if uploaded_file.content_type is None. We now check for this and properly return info about the missing conten type to the caller.
We're using uploaded_file.content_type.startswith('image/'), which fails with an AttributeError if uploaded_file.content_type is None. We now check for this and properly return info about the missing conten type to the caller.