New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

filereader-stream

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filereader-stream

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

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
911
decreased by-66.3%
Maintainers
1
Weekly downloads
 
Created
Source

filereader-stream

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

NPM

If you want this for FileLists then definitely check out fileliststream.

install

Use it with npm & browserify >= 3.0

$ npm install filereader-stream

example

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

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

usage

var createReadStream = require('filereader-stream'. [options]);

options is optional and can specify output. Possible values are:

  • arraybuffer [default]
  • binary
  • dataurl
  • text

You can also specify chunkSize, default is 8128. This is how many bytes will be read and written at a time to the stream you get back for each file.

FAQs

Package last updated on 20 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc