{"version":"1.0","type":"rich","title":"Gist 7571798","description":"This example shows a file-reading utility that loads either image or text files into the browser using the HTML5 File API. It creates a FileReader instance and wraps its asynchronous operations in a jQuery Deferred object, returning a promise that resolves with the file’s content. For images, the reader uses `readAsDataURL` to produce a base64-encoded data URL; for all other file types, it uses `readAsText` to retrieve the raw string. The code handles load and error events, rejecting the promise on failure.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-7571798?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}