-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Text assets's content-type is always text/html #1218
Comments
Thanks for reporting! This is definitely a bug, related to #496 but fixing this in a different place. |
Hey @catarak can you guide me where to start to fix this one. |
You'll need to edit the function getFileContent to change the MIME type based on the file extension. |
ok sending in a pr soon |
Is anyone working on this? |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nature of issue?
Details about the bug:
I found getFileContent function at /p5.js-web-editor/server/controllers/file.controller.js
But there are nothing considered about content-type and rely on default behavior.
Express official document says
https://expressjs.com/en/api.html#res.send
I think that it should be text/javascript(or application/javascript) for .js, application/json for .json and so on.
Thank you.
The text was updated successfully, but these errors were encountered: