Skip to content
Advertisement

Tag: filereader

FileReader upload safety

Say I have <input type=”file”> without any forms, and obtain an image selected by this input via File’s Blob javascript API: And that’s all. Say, there is no php script in my server at all. User just uploads picture via the code below, and, for example, see how the picture is displaying in the web page. In this case, is

Chrome, FileReader API, event.target.result === “”

I have a web app which does some processing on big text-files (> 500mb) via the FileReader API’s readAsText() method. It has been working great for years but suddenly I got empty responses: event.target.result is an empty string. 369MB works but 589MB does not work. I have tested on multiple computers; same result, however it does work in Firefox. Chrome

Convert Blob to binary string synchronously

I’m trying to put image in clipboard when user copies canvas selection: So I thought the right way would be to convert canvas tu dataURL, dataURL to blob and blob to binary string. Theoretically it should be possible to skip the blob, but I don’t know why. So this is what I did: But when the DataTransfer object is used

Advertisement