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

Fog directory appends local system path with amazon url when i try to give dynamic fog directory #295

Closed
plribeiro3000 opened this issue Aug 31, 2016 · 2 comments

Comments

@plribeiro3000
Copy link
Member

I am using FOG with Paperclip. I added the following code to give dynamic directory name.

fog_directory: proc { |file| file.instance.repo.name }

It creates the fog directory correctly but when i try to get url it added the local system path with amazon url.

https://s3.amazonaws.com/%23%3CProc:0x4ae8f3bb@/home/apple/projects/project.name/config/initializers/paperclip.rb:8%3E/abc.jpg

Original issue opened at fog/fog#3874 by @vf-sohail

@plribeiro3000
Copy link
Member Author

cc/ @geemus

@geemus
Copy link
Member

geemus commented Aug 31, 2016

I don't think it is expected to be a proc, so the outputted value there is probably the result of to_s on the proc as called by "#{fog_directory} when building the value. You may be able to work around this by making a class that responds to to_s and returns the custom value though.

@geemus geemus closed this as completed Aug 31, 2016
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