I am using the paperclip gem with Omniauth (with Facebook) in a Rails 3 app. All the profile pictures are saved to Amazon S3.
Now the problem I am encountering is that many of the images are saved as stringio.txt, resulting in duplicated images. That means, some of my users have profile images that are not their own.
It seems that these images also occur when the image itself is more than 10kb.
So far I’ve tried saving directly using open-uri
self.avatar = open(omniauth['user_info']['image'].sub("square","large"))
I found this solution :
In the model where I have the paperclip image
It work well but in my case, I also have images from regular forms, so I think it’s weird to do that. If all the pictures are from Facebook, it will be perfect.