choonkeat / attache

Yet another approach to file upload
MIT License
203 stars 10 forks source link

Fixed fog local storage #29

Closed SammyLin closed 8 years ago

SammyLin commented 8 years ago

Review on Reviewable

choonkeat commented 8 years ago

Most of the code in both path is the same, except we're calling url or public_url right? Want to just do an if else on that method call instead?

SammyLin commented 8 years ago

You're right, but I actually have problems in Fog::Storage::Local::Files.

Because fog-local without url method in file model, I want try to modify url to public_url but i am afraid that affect other plgin.

ref https://github.com/fog/fog-local/blob/master/lib/fog/storage/local/models/file.rb

choonkeat commented 8 years ago

oh i'm not looking to modify Fog::Storage::Local::Files. but in Attache::VHost#storage_url i'll just detect respond_to?(:url) and invoke either or

https://gist.github.com/choonkeat/bc278e10af721ba95c14 (also, added a spec)

what do you think?

SammyLin commented 8 years ago

cool~ it's OK~

choonkeat commented 8 years ago

superceded by bbf4a1f #30