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

[bug]: custom content-type header is overridden #27

Open
reslear opened this issue Jan 13, 2025 · 4 comments
Open

[bug]: custom content-type header is overridden #27

reslear opened this issue Jan 13, 2025 · 4 comments
Assignees
Labels
issue: bug Issue reporting a bug status: confirmed The issue has been confirmed or reproduced manually by a team member

Comments

@reslear
Copy link

reslear commented Jan 13, 2025

A clear and concise description of what the feature is

https://docs.strapi.io/dev-docs/plugins/upload

Why should this feature be included?

https://docs.strapi.io/dev-docs/plugins/upload

Please provide an example for how this would work

No response

Edit: so i found bug:

if i use .fetch('/upload'..., { headers: new Headers({ 'Content-Type': 'multipart/form-data', }), }

my header overrides 😢

CleanShot 2025-01-13 at 03 42 32@2x

@Convly Convly added issue: bug Issue reporting a bug and removed issue: enhancement labels Jan 13, 2025
@Convly
Copy link
Member

Convly commented Jan 13, 2025

Hey, thanks for opening this issue

This should indeed not happen, I'll mark it as a bug, and we'll work on fixing that.

Please, next time try to use the Bug Report template for bugs instead of the feature request one

@Convly Convly added the status: confirmed The issue has been confirmed or reproduced manually by a team member label Jan 13, 2025
@Convly Convly changed the title [feat]: upload [bug]: custom content-type header is overridden Jan 13, 2025
@Convly Convly self-assigned this Jan 13, 2025
@reslear
Copy link
Author

reslear commented Jan 13, 2025

I added the bug later, By the way, I believe this is also a feature, or is it not planned on your end?

@Convly
Copy link
Member

Convly commented Jan 13, 2025

I added the bug later

No problem

By the way, I believe this is also a feature, or is it not planned on your end?

This is considered a bug as it was never the goal to override manually set headers

@Convly
Copy link
Member

Convly commented Jan 13, 2025

By the way, we plan to work on a media/files API to work with the upload plugin for the next minor version of the SDK.

You can check out what's planned at https://strapi.notion.site/Strapi-JavaScript-SDK-plan-15f8f35980748046b7f8fb207b29c64b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug status: confirmed The issue has been confirmed or reproduced manually by a team member
Projects
None yet
Development

No branches or pull requests

2 participants