Giter Site home page Giter Site logo

co-multipart's Introduction

声明: 本文主要解析**来自:https://github.com/expressjs/connect-multiparty

目标和功能

1、同步读取上传文件;

2、将文件解析对象放置在 req.files;同时拷贝对象到 req.body,用以支持接口文档校验;参见:express-api-check

返回参数:

no

  • 200,上传成功
  • 404, 未发现文件
  • 500,解析出错
msg:

错误内容描述

使用方式

let coForm = require('co-multipart');

参数配置 let options = {uploadDir:upfileRoot}

let data = yield coForm(req,options);

data = {no:200};表示读取文件成功。

co-multipart's People

Contributors

zhuangchuming avatar

Watchers

James Cloos avatar  avatar

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.