Git Product home page Git Product logo

nodestream's People

Contributors

robertrossmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodestream's Issues

hello from bionode!

Hey nodestream!

I just came across this project, and it looks like a really good fit for bionode-watermill. In fact, maybe their is even some (slight) overlap in our goals. (Right now we do our own checksum checking on files - and would need to do it on streams as well)

Just wanted to let you know, we have plans to integrate eventually into our project. Any help or suggestions would be greatly appreciated - see bionode/bionode-watermill#46

:)

Provide integration with an http framework

There should be at least one "official" package which integrates nicely with Express. Other framework integrations might come later, such as Koa or Hapi. The goals of such package are described below.

  • Installs itself as a body parser or hooks into existing body parser
  • Watches for incoming file uploads and parses each file into a readable stream without buffering the whole file to disk
  • Provides some nice mechanism (ie. a function attached to req) to configure and initiate the file upload with a previously configured Nodestream instance

Not really sure how this is actually supposed to work. The original inspiration, I guess, comes from how Skipper works. Probably it would be best to defer the actual body parsing to some existing and established library like multiparty and only extract the incoming byte streams from it.

Add support for custom transform names

Currently all transforms must declare their identity, which is then used at various places, ie. for exporting the transform's result data on the final object (the identity is used as object key).

This, however, limits the use of a single transform multiple times in a pipeline and forces all transforms to have unique identity across all existing transforms, whether they are core or 3rd party.

We should extend nodestream.registerTransform() to accept a string parameter as first argument, which, when supplied, will be used as the transform's identity.

problem when used with stream buffer

I have a problem when using nodestream with stream buffers is that upload function returned promise is not resolved neither rejected inspite file is uploaded

I want to upload base64 encoded string and save it to a file so I used stream buffers for making stream instance holding base64 file and then passing it to the nodestream upload function

const Nodestream = require('nodestream')

const fs=require('fs')

const {ReadableStreamBuffer} =require('stream-buffers')

const nodestream = new Nodestream({
  adapter: 'filesystem',
  config: {
       root: [__dirname, '.storage']
  }
})

const stream=new ReadableStreamBuffer({})

stream.put(fs.readFileSync('toread.txt').toString('base64'),'base64')

//neither resolve or reject is called inspite file is called
nodestream.upload(stream).then(res=>{
   
 if(fs.existsSync(`.storage/${res.location}`))
    {
        console.log('file exist')
    }
    else
    {
        console.log('file not exist')
    }
}).catch(ex=>console.log(ex.message))

Implement progress monitoring

Allow developers to attach some kind of onProgress function to the upload/download request. This must not require adapter support and must be implemented here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.