Saturday, 15 August 2015

Display response of Dropbox API thumbnail() in Rails app -



Display response of Dropbox API thumbnail() in Rails app -

i have returned thumbnail() request (using dropbox sdk) in rails app, don't understand how process response. show thumbnail on webpage.

i tried save response tmp file, undefinedconversionerror ("\xff" ascii-8bit utf-8) error.

i'm doing asking for. did convert returned bytes base64 string. in c# it's quite easy there convert function that.

on webpage have set src attribute of img tag to

<img src="data: image/jpg;base64,placebase64stringhere"...../>

there little overhead in converted string, it's easy handle , utilize powerfulness of client browser render image.

ruby-on-rails dropbox-api

No comments:

Post a Comment