mongoid-grid_fs icon indicating copy to clipboard operation
mongoid-grid_fs copied to clipboard

data_uri not returning the correct base64 encoded data

Open yudho opened this issue 11 years ago • 3 comments

data_uri method returns the base64 encoded version of something else, but not the blob/binary data.

yudho avatar May 23 '14 00:05 yudho

I have fixed this in Pull Request #45
Please merge that. Thank you.

yudho avatar May 23 '14 02:05 yudho

When I called data_uri on the file, it returns this:

"data:image/jpeg;base64,IzxNb25nb2lkOjpHcmlkRnM6OkZzOjpGaWxlOjB4MDAwMDAwMDJlMzFlMTA+"

When I tried it on the browser, no image came out. Do you know what caused it or how I could fix it?

Thank you very much!

JudyWu avatar Oct 28 '15 17:10 JudyWu

Hi, I developed the same fix as yudho, please merge his code.

Also other people found the same problem: http://stackoverflow.com/questions/33344217/cant-get-data-uri-working-in-mongoid-grid-fs-gem

MarcoLosito avatar Nov 27 '15 16:11 MarcoLosito