{"action":"closed","issue":{"url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2235","repository_url":"https://api.github.com/repos/thoughtbot/paperclip","labels_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2235/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2235/comments","events_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/2235/events","html_url":"https://github.com/thoughtbot/paperclip/issues/2235","id":161025113,"number":2235,"title":"Problems saving m4a and 3gp files","user":{"login":"kuritsu","id":5035140,"avatar_url":"https://avatars.githubusercontent.com/u/5035140?v=3","gravatar_id":"","url":"https://api.github.com/users/kuritsu","html_url":"https://github.com/kuritsu","followers_url":"https://api.github.com/users/kuritsu/followers","following_url":"https://api.github.com/users/kuritsu/following{/other_user}","gists_url":"https://api.github.com/users/kuritsu/gists{/gist_id}","starred_url":"https://api.github.com/users/kuritsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuritsu/subscriptions","organizations_url":"https://api.github.com/users/kuritsu/orgs","repos_url":"https://api.github.com/users/kuritsu/repos","events_url":"https://api.github.com/users/kuritsu/events{/privacy}","received_events_url":"https://api.github.com/users/kuritsu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-18T13:39:51Z","updated_at":"2016-08-19T02:02:26Z","closed_at":"2016-08-19T02:02:26Z","body":"I am having trouble to save this files using paperclip: [audio1](https://github.com/kuritsu/bugs/blob/master/v.m4a) (voice recording from an iPhone) [audio2] (https://github.com/kuritsu/bugs/blob/master/Voice00008.3gp) (voice recording from an LG Android phone). \r\n\r\nThe error it reports is the following:\r\n\r\n```\r\nCommand :: PATH=/usr/local/bin/:$PATH; file -b --mime '/tmp/9e3669d19b675bd57058fd4664205d2a20160618-4140-1cpao2t.m4a'\r\n[paperclip] Content Type Spoof: Filename v.m4a (video/3gpp from Headers, [#<MIME::Type::Columnar:\r\n..... \r\na huge content type list\r\n....\r\nthen:\r\n@__root__=\"/usr/share/ruby-mime-types\">, @content_type=\"audio/MP4A-LATM\", @raw_media_type=\"audio\", @raw_sub_type=\"MP4A-LATM\", @simplified=\"audio/mp4a-latm\", @i18n_key=\"audio.mp4a-latm\", @media_type=\"audio\", @sub_type=\"mp4a-latm\", @extensions=[\"m4a\"]>] from Extension), content type discovered from file command: application/octet-stream. See documentation to allow this combination.\r\nFile has contents that are not what they are reported to be\r\n```\r\n\r\nThis is the code I'm using: \r\n```ruby\r\nhas_attached_file :file,\r\n                    :storage => ((Rails.env.production? || Rails.env.staging?) ? :s3 : :filesystem),\r\n                    :bucket => ENV[\"S3_BUCKET_NAME\"],\r\n                    :s3_credentials => {\r\n                        :access_key_id => ENV[\"AWS_ACCESS_KEY_ID\"],\r\n                        :secret_access_key => ENV[\"AWS_SECRET_ACCESS_KEY\"],\r\n                    },\r\n                    :url => (Rails.env.production? || Rails.env.staging?) ? ':s3_alias_url' : '/attachments/twilio/:id/:basename.:extension',\r\n                    :s3_host_alias => \"url\",\r\n                    :path => (Rails.env.production? || Rails.env.staging?) ? 'attachments/:id/:basename.:extension' : ':rails_root/public/attachments/:id/:basename.:extension'\r\n\r\n  do_not_validate_attachment_file_type :file\r\n``` \r\nVersions:\r\nUbuntu Wily 15.10\r\nUbuntu Packages:\r\nfile: 5.22+15-2ubuntu1\r\nruby: 2.1.5p273\r\nGems:\r\nrails 4.2.4\r\npaperclip 4.3.1\r\n\r\n"}}
{"actor":{"display_login":"tute"}}