arc
arc copied to clipboard
[Question] How to set asset host for URL's with local storage?
Hi! I am using the Local Storage in dev mode, and S3 in production. But the .url
does not return a full URL, but only the absolute path.
I am using arc master and tried to set the asset_host
:
config :arc,
asset_host: "https://localhost:4000"
def storage_dir(_, {_, scope}) do
"uploads/auth/avatars/#{generate_id(scope.id)}"
end
def avatar_url(account, format \\ :thumb) do
Avatar.url({account.avatar, account}, format)
end
Its only usable with S3 at the moment or do I have a bug?
PS: I just gave the 400th star 😊
@philipgiuliani take a look at my PR #185.