{"action":"closed","issue":{"url":"https://api.github.com/repos/cloudinary/cloudinary_gem/issues/156","labels_url":"https://api.github.com/repos/cloudinary/cloudinary_gem/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/cloudinary/cloudinary_gem/issues/156/comments","events_url":"https://api.github.com/repos/cloudinary/cloudinary_gem/issues/156/events","html_url":"https://github.com/cloudinary/cloudinary_gem/issues/156","id":83621778,"number":156,"title":"Wrong file extension is used when generating cloudinary_url","user":{"login":"diazruy","id":484865,"avatar_url":"https://avatars.githubusercontent.com/u/484865?v=3","gravatar_id":"","url":"https://api.github.com/users/diazruy","html_url":"https://github.com/diazruy","followers_url":"https://api.github.com/users/diazruy/followers","following_url":"https://api.github.com/users/diazruy/following{/other_user}","gists_url":"https://api.github.com/users/diazruy/gists{/gist_id}","starred_url":"https://api.github.com/users/diazruy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diazruy/subscriptions","organizations_url":"https://api.github.com/users/diazruy/orgs","repos_url":"https://api.github.com/users/diazruy/repos","events_url":"https://api.github.com/users/diazruy/events{/privacy}","received_events_url":"https://api.github.com/users/diazruy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-01T17:51:05Z","updated_at":"2015-06-08T21:02:40Z","closed_at":"2015-06-08T21:02:40Z","body":"I am using Cloudinary's Carrierwave integration, and I'm running into an issue with the extension in the URL being incorrect. The value in my DB is stored as `some_image.jpeg`, but when I request the `#url` (or even just the `#filename`, it returns it as `some_image.jpg`, which is incorrect. \r\n\r\nThese are images that I am getting [Automatically Uploaded (Origin Pulling)](http://cloudinary.com/blog/how_to_automatically_migrate_all_your_images_to_the_cloud) from S3 through a mapping, which is why these have the `jpeg` extension in the first place. I believe the problem might stem from the use of [`self.format`](https://github.com/cloudinary/cloudinary_gem/blob/master/lib/cloudinary/carrier_wave.rb#L51) when generating the URL, and CarrierWave must be normalizing this to always be `jpg`.\r\n\r\n```ruby\r\ndevelopment (main):0 > a.image.url\r\n=> \"http://res-1.cloudinary.com/my_cloud/image/upload/v1/my-mapping/some_image.jpg\"\r\ndevelopment (main):0 > a[:image]\r\n=> \"my-mapping/some_image.jpeg\"\r\ndevelopment (main):0 > a.image.full_public_id\r\n=> \"my-mapping/some_image\"\r\ndevelopment (main):0 > a.image.filename\r\n=> \"my-mapping/some_image.jpg\"\r\ndevelopment (main):0 > a.image.format\r\n=> \"jpg\"\r\n```\r\n\r\nIs it possible to get the URL generated with the original extension?"}}