Skip to content

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

Open

Description

@lilei-c5

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.

Activity

  1. aleksandar-cloudinary commented on Jan 14, 2020

    @aleksandar-cloudinary
    Contributor

    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.

  2. aleksandar-cloudinary commented on Jan 19, 2020

    @aleksandar-cloudinary
    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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions