A
A
Andrey2017-10-12 13:50:12
Ruby on Rails
Andrey, 2017-10-12 13:50:12

How to set custom path for paperclip?

There is one monolithic application, inside there are two applications - app1and app2.
They have common models.
The file is created in app1, and accordingly saved in app1:rails_root/public/....
and when called, ticket.document.urlthe second application does not see it, since it refers to app2:rails_root/public/....
Probably there are two ways out:
1) How to save immediately to the second application?
1) How to specify the url where to look from the second application?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
N. Bekseitov, 2017-10-12
@nbekseitov

has_attached_file :attachment, path: "/full_path_to_app1/public/images/:id/:style/:basename.:extension"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question