-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default to application/octet-stream #1054
Conversation
ab1088d
to
6555dea
Compare
@fred-stripe friendly bump on this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM barring the comment I put (but really it's minor)
@@ -179,6 +179,11 @@ private static void ApplyMultiPartFileToRequest(HttpRequestMessage requestMessag | |||
{ | |||
requestMessage.Headers.ExpectContinue = true; | |||
|
|||
if (string.IsNullOrEmpty(fileName)) | |||
{ | |||
fileName = "blob"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be more explicit to indicate it's a hardcoded value? blob has some meaning for me as a type (like in a database) and so it felt weird the first 2 times I read the PR.
No big deal obviously but wanted to flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha, works for me if we do this in the other libs!
LGTM |
r? @fred-stripe
cc @stripe/api-libraries
Fixes #1053.
We could even remove
MimeTypes.cs
entirely and just useapplication/octet-stream
always. This is what the Python library does (here).I've also set a default value for the filename, as the API does require one (cf. stripe/stripe-python#227 for more context).