cari

Rumah  >  Soal Jawab  >  teks badan

node.js - 怎么把文件流传到七牛?

使用nodejs获取到了上传的文件信息:

{ fieldname: 'file',
  originalname: 'p2259538060.jpg',
  encoding: '7bit',
  mimetype: 'image/jpeg',
  buffer: <Buffer ff d8 ff e1 00 18 45 78 69 66 00 00 49 49 2a 00 08 00 00 00 00
 00 00 00 00 00 00 00 ff ec 00 11 44 75 63 6b 79 00 01 00 04 00 00 00 3c 00 00 f
f e1 03 ... >,
  size: 188231 }

怎么把它传到七牛?使用哪个API?

PHP中文网PHP中文网2785 hari yang lalu489

membalas semua(1)saya akan balas

  • PHP中文网

    PHP中文网2017-04-17 15:21:35

    qiniu.io.putReadable(uptoken, key, request('https://xxx.jpg'), extra, function(err, ret))

    balas
    0
  • Batalbalas