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

Content type error when uploading files #19

Closed
HLMQA opened this issue Dec 4, 2018 · 1 comment
Closed

Content type error when uploading files #19

HLMQA opened this issue Dec 4, 2018 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@HLMQA
Copy link
Collaborator

HLMQA commented Dec 4, 2018

Likely caused by recent update to rails 5.2.1.1

Can be reproduced by editing recipe and uploading an image file into it.

config/initializers/active_storage.rb:121:in `upload'
config/initializers/active_storage.rb:72:in `upload'
config/initializers/active_storage.rb:96:in `create_blob_from'
config/initializers/active_storage.rb:10:in `photo='
app/controllers/recipes_controller.rb:73:in `block in update'
app/controllers/recipes_controller.rb:72:in `update'

More info & fixes here
rails/rails#34550
https://stackoverflow.com/questions/53560064/unknown-keyword-content-type-in-active-storage-5-2-1-1

@HLMQA HLMQA added the bug Something isn't working label Dec 4, 2018
@HLMQA HLMQA added this to the 1.0 milestone Dec 4, 2018
@HLMQA HLMQA added this to To do in Dining Car First Version via automation Dec 4, 2018
@renatolond
Copy link
Contributor

I think this was introduced by updating to rails 5.2.1.1, but it's caused by the monkey patching at 26b83f2
We should re-sync https://github.com/rails/rails/blob/v5.2.1.1/activestorage/lib/active_storage/service/disk_service.rb and related files in the monkey patch. Maybe check if v5.2.2 already fixes the issues on ActiveStorage and remove the monkey patch completely.

renatolond added a commit that referenced this issue Dec 7, 2018
rails 5.2.1.1 changed the signature for active storage upload function
and we didn't reflect that in the upgrade. This adds a test to catch
stuff like that in the future and updates the code to match.
Fixes #19
renatolond added a commit that referenced this issue Dec 7, 2018
rails 5.2.1.1 changed the signature for active storage upload function
and we didn't reflect that in the upgrade. This adds a test to catch
stuff like that in the future and updates the code to match.
Fixes #19
@HLMQA HLMQA closed this as completed in #22 Dec 7, 2018
Dining Car First Version automation moved this from To do to Done Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants