Add MIME content type info to File#143
Merged
Kludex merged 16 commits intoKludex:masterfrom Apr 10, 2026
Merged
Conversation
Kludex
requested changes
Dec 6, 2024
Makes all headers lower case, fixing case sensitivity issues. Exposes jheaders property in Files and Fields.
4304002 to
f1e28d6
Compare
Kludex
reviewed
Dec 11, 2024
0fc5e2d to
f1e28d6
Compare
Kludex
reviewed
Dec 16, 2024
|
|
||
| # Get the field and filename. | ||
| field_name = options.get(b"name") | ||
| field_name = options.get(b"name", b"") |
Owner
There was a problem hiding this comment.
Is this needed? Isn't the field_name supposed to always be present?
Contributor
Author
There was a problem hiding this comment.
I added this for typing. Without it, we'll need to raise or assert it's not None. Which makes sense actually.
Will probably need a test to cover it. too.
Contributor
Author
There was a problem hiding this comment.
Removed the default value and added a check for None.
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Kludex
requested changes
Dec 25, 2024
jhnstrk
commented
Jan 21, 2025
Contributor
Author
jhnstrk
left a comment
There was a problem hiding this comment.
Updated the code in response to suggestions. Additional comments inline.
added 3 commits
April 10, 2026 12:23
# Conflicts: # python_multipart/multipart.py
# Conflicts: # python_multipart/multipart.py
Kludex
reviewed
Apr 10, 2026
Kludex
approved these changes
Apr 10, 2026
Owner
Kludex
left a comment
There was a problem hiding this comment.
Sorry the delay. I've fixed some minor stuff. Thanks for contributing!
This was referenced Apr 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds MIME type information as
File.content_typeas requested in issue #58.Tests have been updated and a case-sensitive header issue was fixed too.
The part headers are also exposed as a dict, with keys as strings, lower-cased as
File.headers.