{"action":"created","issue":{"url":"https://api.github.com/repos/stavro/arc_ecto/issues/7","labels_url":"https://api.github.com/repos/stavro/arc_ecto/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/stavro/arc_ecto/issues/7/comments","events_url":"https://api.github.com/repos/stavro/arc_ecto/issues/7/events","html_url":"https://github.com/stavro/arc_ecto/issues/7","id":108189365,"number":7,"title":"Ecto model is not yet saved, when Arc is saving the file, resulting in empty scope","user":{"login":"MartinElvar","id":1180266,"avatar_url":"https://avatars.githubusercontent.com/u/1180266?v=3","gravatar_id":"","url":"https://api.github.com/users/MartinElvar","html_url":"https://github.com/MartinElvar","followers_url":"https://api.github.com/users/MartinElvar/followers","following_url":"https://api.github.com/users/MartinElvar/following{/other_user}","gists_url":"https://api.github.com/users/MartinElvar/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinElvar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinElvar/subscriptions","organizations_url":"https://api.github.com/users/MartinElvar/orgs","repos_url":"https://api.github.com/users/MartinElvar/repos","events_url":"https://api.github.com/users/MartinElvar/events{/privacy}","received_events_url":"https://api.github.com/users/MartinElvar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-24T18:39:38Z","updated_at":"2015-09-24T18:42:14Z","closed_at":null,"body":"Using the local storage, i ran into a problem, where the folders would not be created upon model creation, my storage dir looks like this.\r\n```\r\n  # Override the storage directory:\r\n  def storage_dir(_, {_, scope}) do\r\n    module_name = Mobil.Article.__info__(:module)\r\n    |> Module.split\r\n    |> List.last\r\n    |> String.downcase\r\n    \"priv/static/images/#{module_name}/banner/#{scope.id}\"\r\n  end\r\n```\r\n\r\nAs you can see i use the scope id, as suggested in the documentation; the problem is that Arc saves the file before the model i saved, which means that the id doesn't exist. This result in the files ending up in `priv/static/images/#{module_name}/banner/` overwriting each other constantly."},"comment":{"url":"https://api.github.com/repos/stavro/arc_ecto/issues/comments/143015726","html_url":"https://github.com/stavro/arc_ecto/issues/7#issuecomment-143015726","issue_url":"https://api.github.com/repos/stavro/arc_ecto/issues/7","id":143015726,"user":{"login":"KingKongDan","id":14826437,"avatar_url":"https://avatars.githubusercontent.com/u/14826437?v=3","gravatar_id":"","url":"https://api.github.com/users/KingKongDan","html_url":"https://github.com/KingKongDan","followers_url":"https://api.github.com/users/KingKongDan/followers","following_url":"https://api.github.com/users/KingKongDan/following{/other_user}","gists_url":"https://api.github.com/users/KingKongDan/gists{/gist_id}","starred_url":"https://api.github.com/users/KingKongDan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KingKongDan/subscriptions","organizations_url":"https://api.github.com/users/KingKongDan/orgs","repos_url":"https://api.github.com/users/KingKongDan/repos","events_url":"https://api.github.com/users/KingKongDan/events{/privacy}","received_events_url":"https://api.github.com/users/KingKongDan/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T18:42:14Z","updated_at":"2015-09-24T18:42:14Z","body":"I had the same problem. Thanks for addressing this issue."}}