stavro / arc

:paperclip: Flexible file upload and attachment library for Elixir
1.16k stars 210 forks source link

Different public path for uploads #42

Open gitviola opened 8 years ago

gitviola commented 8 years ago

Path for the application to access the file: priv/static/system/trainers/avatars/17/thumb-ms_big_yellow.png.png?v=63620674899

Public path to the file: http://localhost:4000/system/trainers/avatars/17/thumb-ms_big_yellow.png.?v=63620674899

I tried it with:

MyApp.Avatar.url({@trainer.avatar, @trainer}, :thumb)

but it returns priv/static/system/trainers/avatars/17/thumb-ms_big_yellow.png.png?v=63620674899 which of course can't be accessed by the user since the domain is rooted to the priv/static directory.

How do I get this to work? Couldn't find anything in the docs.

stavro commented 8 years ago

Duplicate of: https://github.com/stavro/arc_ecto/issues/4

This has a temporary solution you can use

nordbit commented 8 years ago

Can You put hint in documentation? Phoenix Framework is lack of good documentation/or configuration options. Arc is only pluggable uploader for now.