We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DEPRECATION WARNING: Rails 6.1 will return Content-Type header without modification. If you want just the MIME type, please use #media_type instead.
#media_type
gems/remotipart-1.4.4/lib/remotipart/render_overrides.rb:37:in `treat_render_for_remotipart' gems/remotipart-1.4.4/lib/remotipart/render_overrides.rb:23:in `render'
https://github.com/JangoSteve/remotipart/blob/v1.4.4/lib/remotipart/render_overrides.rb#L37
The text was updated successfully, but these errors were encountered:
I did some basic investigation on that and came to the conclusion that the deprecation warning can be ignored.
After setting the following configuration, file uploads continued to work:
Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false ActionDispatch::Response.return_only_media_type_on_content_type = false
I believe the reason for this can be found in jquery.iframe-transport.js: https://github.com/JangoSteve/remotipart/blob/master/vendor/assets/javascripts/jquery.iframe-transport.js#L222 The content_type from the textarea is simply passed to jQuery as Content-Type. jQuery seems to be able to handle any extra ; charset=utf-8 information.
jquery.iframe-transport.js
content_type
textarea
Content-Type
; charset=utf-8
Sorry, something went wrong.
No branches or pull requests
DEPRECATION WARNING: Rails 6.1 will return Content-Type header without modification. If you want just the MIME type, please use
#media_type
instead.https://github.com/JangoSteve/remotipart/blob/v1.4.4/lib/remotipart/render_overrides.rb#L37
The text was updated successfully, but these errors were encountered: