Skip to content
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

Set the right content type for files in multipart requests #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karlhaas
Copy link

@karlhaas karlhaas commented Aug 9, 2023

What is being done in this PR?

Calculate the content type of each multipart file instead of setting the content type application/octet-stream because it is not the behavior of the browser.

What are the main choices made to get to this solution?

Uploading multipart content does set e.g. image/jpeg for JPEGs and not application/octet-stream

List the manual test cases you've covered before sending this PR:

Added unit tests

@karlhaas
Copy link
Author

@sio4 could you please review and merge?

@karlhaas
Copy link
Author

@markbates could you please review and merge?

@karlhaas
Copy link
Author

karlhaas commented Dec 4, 2023

@paganotoni could you also review this one?

@karlhaas
Copy link
Author

@sio4 @markbates @paganotoni somebody there?

@sio4
Copy link
Member

sio4 commented Jan 24, 2024

Hi @karlhaas
I am sorry. I was not actually reviewing it recently. By the way, what is your issue made you write this PR?

@karlhaas
Copy link
Author

@sio4 it is related to gobuffalo/buffalo#2389. In order to test the upload of multiple files, the content type of the files must be set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants