This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +3
-150
lines changed Expand file tree Collapse file tree 4 files changed +3
-150
lines changed Original file line number Diff line number Diff line change 2
2
3
3
const FormData = require ( 'form-data' )
4
4
const { Buffer } = require ( 'buffer' )
5
+ const toStream = require ( 'it-to-stream' )
5
6
const normaliseInput = require ( './normalise-input' )
6
- const toStream = require ( '../lib/iterable-to-readable-stream' )
7
7
8
8
exports . toFormData = async ( input ) => {
9
9
const files = normaliseInput ( input )
@@ -19,7 +19,7 @@ exports.toFormData = async (input) => {
19
19
// a Content-Length header that is only the sum of the size of the
20
20
// header/footer when knownLength option (below) is null.
21
21
Object . assign (
22
- toStream ( file . content ) ,
22
+ toStream . readable ( file . content ) ,
23
23
{ path : file . path || `file-${ i } ` }
24
24
) ,
25
25
{
Original file line number Diff line number Diff line change 3
3
const promisify = require ( 'promisify-es6' )
4
4
const concatStream = require ( 'concat-stream' )
5
5
const once = require ( 'once' )
6
- const FileResultStreamConverter = require ( '../utils/file-result-stream-converter' )
7
6
const SendFilesStream = require ( '../utils/send-files-stream' )
8
7
9
8
module . exports = ( send ) => {
@@ -29,8 +28,7 @@ module.exports = (send) => {
29
28
30
29
const options = {
31
30
args : pathDst ,
32
- qs : opts ,
33
- converter : FileResultStreamConverter
31
+ qs : opts
34
32
}
35
33
36
34
const stream = sendFilesStream ( { qs : options } )
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments