Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to set asset host for URL's with local storage? #131

Open
philipgiuliani opened this issue Nov 16, 2016 · 1 comment
Open

Comments

@philipgiuliani
Copy link

philipgiuliani commented Nov 16, 2016

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 😊

@makkrnic
Copy link

@philipgiuliani take a look at my PR #185.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants