Coder Social home page Coder Social logo

multipart-read-stream's Introduction

Yosh is …

Calm computing. Working on the Rust programming language at Microsoft. Focused on making async programming reliable and accessible. Also an enthusiast cook, cat dad, and prospective DIY guy. Previously: Berlin, Sydney, Amsterdam. Now in Copenhagen.

Also on: Website, Twitter, YouTube, and Twitch.

Async Rust

Rust web programming

  • http-types - Common types for HTTP operations for async Rust.
  • tide - Fast and friendly HTTP server framework for async Rust
  • surf - Fast and friendly HTTP client framework for async Rust.
  • localghost - Ergonomic Rust bindings to the Web platform.
  • async-h1 - HTTP/1.1 parser and encoder for async Rust.
  • async-sse - Server-Sent Events parser and encoder for async Rust.
  • async-session - Session support with plugabble backends for async Rust.

Support

If you like what I'm working on, please consider supporting my work via GitHub sponsors.

multipart-read-stream's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

multipart-read-stream's Issues

new api

Figured this might be easier to read / figure out what's going on:

var multipart = require('multipart-read-stream')
var http = require('http')
var pump = require('pump')

http.createServer(function (req, res) {
  var type = req.headers['content-type']
  var filestream = multipart(type, fileHandler)

  pump(req, filestream, function (err) {
    if (err) (res.statusCode = 400 && res.end('oh no!'))
    res.end()
  })

  function fileHandler (fieldname, file, filename) {
    console.log(`reading file ${filename} from field ${fieldname}`)
    file.pipe(process.stdout)
  }
}).listen(8080)

cc/ @davidmarkclements thoughts?

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.