Topic: Base64 upload
I am working on a project where a mobile phone sends a base64 encoded picture to the rails application and it needs to be saved.
I tried various example over the internet but none worked.
With some the file managed to be saved, but it was corrupted (it wasn't the picture).
I tried with Tempfile, with StringIO.new, File.open (with "rb") and f.write and none saved the real image.
Also I tried different encoded images, different extensions, added image type where it was required, but nothing seems to work.
I am using paperclip for uploading throw forms.
Can someone give me a reference or something ?
Last edited by shumi (2013-06-04 16:11:31)