Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

filereader-stream

Read an HTML5 File object (from e.g. HTML5 drag and drops) as a stream.

Subscribe to updates I use filereader-stream


Statistics on filereader-stream

Number of watchers on Github 64
Number of open issues 2
Average time to close an issue 8 months
Main language JavaScript
Average time to merge a PR about 2 hours
Open pull requests 0+
Closed pull requests 5+
Last commit over 3 years ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 216 KB
Organization / Authormaxogden
Contributors4
Page Updated
Do you use filereader-stream? Leave a review!
View open issues (2)
View filereader-stream activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating filereader-stream for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

filereader-stream

Given an HTML5 File object (from e.g. HTML5 drag and drops), turn it into a readable stream.

install

Use it with npm & browserify

$ npm install filereader-stream

example

var drop = require('drag-and-drop-files')
var concat = require('concat-stream')
var fileReaderStream = require('filereader-stream')

test('should read file when one is dropped', function(t) {
  drop(document.body, function(files) {
    var first = files[0]
    fileReaderStream(first).pipe(concat(function(contents) {
      // contents is the contents of the entire file
    }))
  })
})

usage

var fileReaderStream = require('filereader-stream')
var readStream = fileReaderStream(file, [options])

fileReaderStream is a Streams 2 Readable Stream, so you can do all the streamy things with it like .pipe etc.

options:

  • chunkSize - default 1024 * 1024 (1MB) - How many bytes will be read at a time
  • offset - default 0 - Where in the file to start reading

run the tests

npm install
npm test

then open your browser to the address provided, open your JS console, and drag and drop files onto the page until the test suite passes/fails

filereader-stream open issues Ask a question     (View All Issues)
  • over 3 years Memory leak
  • about 5 years Breaking file streaming upload in Firefox
filereader-stream list of languages used
Other projects in JavaScript