码迷,mamicode.com
首页 > Web开发 > 详细

【图片上传】

时间:2015-05-23 14:12:58      阅读:110      评论:0      收藏:0      [点我收藏+]

标签:

<input type="file" name="picture"> 没有上传文件时输出 req.files.picture

{ fieldName: ‘picture‘,
  originalFilename: ‘‘,
  path: ‘upload/5157-mukcpk‘,
  headers: 
   { ‘content-disposition‘: ‘form-data; name="picture"; filename=""‘,
     ‘content-type‘: ‘application/octet-stream‘ },
  ws: 
   { _writableState: 
      { highWaterMark: 16384,
        objectMode: false,
        needDrain: false,
        ending: true,
        ended: true,
        finished: true,
        decodeStrings: true,
        defaultEncoding: ‘utf8‘,
        length: 0,
        writing: false,
        sync: true,
        bufferProcessing: false,
        onwrite: [Function],
        writecb: null,
        writelen: 0,
        buffer: [],
        errorEmitted: false },
     writable: true,
     domain: null,
     _events: { error: [Object], close: [Object] },
     _maxListeners: 10,
     path: ‘upload/5157-mukcpk‘,
     fd: null,
     flags: ‘w‘,
     mode: 438,
     start: undefined,
     pos: undefined,
     bytesWritten: 0,
     open: [Function],
     _write: [Function],
     destroy: [Function],
     close: [Function],
     destroySoon: [Function],
     pipe: [Function],
     write: [Function],
     end: [Function],
     setMaxListeners: [Function],
     emit: [Function],
     addListener: [Function],
     on: [Function],
     once: [Function],
     removeListener: [Function],
     removeAllListeners: [Function],
     listeners: [Function] },
  size: 0,
  name: ‘‘,
  type: ‘application/octet-stream‘ }

 

【图片上传】

标签:

原文地址:http://www.cnblogs.com/jzm17173/p/4524028.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!