arc icon indicating copy to clipboard operation
arc copied to clipboard

Different public path for uploads

Open gitviola opened this issue 10 years ago • 2 comments

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.

gitviola avatar Jan 22 '16 10:01 gitviola

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

This has a temporary solution you can use

stavro avatar Jan 22 '16 18:01 stavro

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

nordbit avatar Jan 23 '16 08:01 nordbit