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

Documentation for "data" method (doesn't work with Paperclip) #2

Open
morgler opened this issue Apr 13, 2011 · 1 comment
Open

Documentation for "data" method (doesn't work with Paperclip) #2

morgler opened this issue Apr 13, 2011 · 1 comment

Comments

@morgler
Copy link

morgler commented Apr 13, 2011

I applied your patch to my rails app with sunspot support. In the readme you state:

"This version assumes the attachment attribute has method +.data+, that returns contents of the attachment."

But what exactly should "data" return? It doesn't work with a paperclip attachment out of the box. I also tried to patch the a
paperclip attachment to respond to the "data" method, but I don't know what it should return. to_file or even uploading the file as a multipart post using UploadIO didn't work. Could you please add some documentation about what "data" is supposed to return and maybe even how to make your patch work with paperclip? Thanks.

@tomasc
Copy link
Owner

tomasc commented Apr 15, 2011

Hi there,
I am using dragonfly to handle attachments/images in my app. The data method should be equivalent to file.read.
Hope that helps.
Best, Tomas

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