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

Error in generating extension for video/mp4 content type for ActiveStorage image delivery url #379

Open
lilei-c5 opened this issue Jan 13, 2020 · 2 comments
Assignees
Labels

Comments

@lilei-c5
Copy link

Problem

When using with Rails ActiveStorage, the extension generated for a content_type of video/mp4 is mp4v, while it is saved in cloudinary with the extension of mp4 in the url. As a result, image delivery with Active Storage is broken.

Extension generated should be mp4.

@aleksandar-cloudinary
Copy link
Contributor

aleksandar-cloudinary commented Jan 14, 2020

Hi @lilei-c5. Thanks for reporting this. This is due to https://github.com/cloudinary/cloudinary_gem/blob/master/lib/active_storage/service/cloudinary_service.rb#L154 where it swaps the keys/values and because the extensions are unique but the content_type not when they are inverted it takes the last value for extension (.mp4v in this case) and that is set as the values for the video/mp4 content type key. I'll create a ticket on our side to resolve this.

@aleksandar-cloudinary
Copy link
Contributor

@lilei-c5 Just wanted to update you that our team have rolled out a fix for this. May I please ask you to update the gem to version 1.13.2 and try that again?

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

No branches or pull requests

2 participants