{"action":"opened","issue":{"url":"https://api.github.com/repos/carrierwaveuploader/carrierwave/issues/1565","labels_url":"https://api.github.com/repos/carrierwaveuploader/carrierwave/issues/1565/labels{/name}","comments_url":"https://api.github.com/repos/carrierwaveuploader/carrierwave/issues/1565/comments","events_url":"https://api.github.com/repos/carrierwaveuploader/carrierwave/issues/1565/events","html_url":"https://github.com/carrierwaveuploader/carrierwave/issues/1565","id":58171030,"number":1565,"title":"Question: why are filenames saved as an array?","user":{"login":"olimart","id":547754,"avatar_url":"https://avatars.githubusercontent.com/u/547754?v=3","gravatar_id":"","url":"https://api.github.com/users/olimart","html_url":"https://github.com/olimart","followers_url":"https://api.github.com/users/olimart/followers","following_url":"https://api.github.com/users/olimart/following{/other_user}","gists_url":"https://api.github.com/users/olimart/gists{/gist_id}","starred_url":"https://api.github.com/users/olimart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olimart/subscriptions","organizations_url":"https://api.github.com/users/olimart/orgs","repos_url":"https://api.github.com/users/olimart/repos","events_url":"https://api.github.com/users/olimart/events{/privacy}","received_events_url":"https://api.github.com/users/olimart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-19T05:57:01Z","updated_at":"2015-02-19T05:57:01Z","closed_at":null,"body":"Here is how attachments are currently saved:\r\n\r\n```\r\n[#<AttachmentUploader:0x007fc557199e60 @model=#<Order id: 59, \r\nattachments: \"[\\\"image1.png\\\", \\\"image2.png\">, @mounted_as=:attachments, @storage=#\r\n<CarrierWave::Storage::File:0x007fc557199de8 @uploader=#<AttachmentUploader:0x007fc557199e60 ...>>\r\n, @file=#<CarrierWave::SanitizedFile:0x007fc5571995c8 \r\n@file=\"/myapp/public/uploads/order/attachments/59/[\\\"image1.png\\\", \\\"image2.png\\\"]\", \r\n@original_filename=nil, @content_type=nil>, @versions={}>]\r\n```\r\nLooping through `order.attachments` returns 1 single file `__image1.png____image2.png__`\r\n\r\nI'm following the multiple upload section of the readme.\r\n\r\n**Order model**\r\n```\r\nmount_uploaders :attachments, AttachmentUploader\r\n```\r\nattachment is JSON type column in PG.\r\n\r\n**views**\r\n```ruby\r\n<%= f.file_field :attachments, multiple: true %>\r\n<% @order.attachments.each do |file| %>\r\n  <li><%= link_to file.file.filename, file.url %></li>\r\n<% end %>\r\n```"}}