Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 6e75bc6

Browse files
author
Alan Shaw
committed
refactor: remove unused code
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 4103dc6 commit 6e75bc6

File tree

4 files changed

+3
-150
lines changed

4 files changed

+3
-150
lines changed

src/add/form-data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
const FormData = require('form-data')
44
const { Buffer } = require('buffer')
5+
const toStream = require('it-to-stream')
56
const normaliseInput = require('./normalise-input')
6-
const toStream = require('../lib/iterable-to-readable-stream')
77

88
exports.toFormData = async (input) => {
99
const files = normaliseInput(input)
@@ -19,7 +19,7 @@ exports.toFormData = async (input) => {
1919
// a Content-Length header that is only the sum of the size of the
2020
// header/footer when knownLength option (below) is null.
2121
Object.assign(
22-
toStream(file.content),
22+
toStream.readable(file.content),
2323
{ path: file.path || `file-${i}` }
2424
),
2525
{

src/files-mfs/write.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
const promisify = require('promisify-es6')
44
const concatStream = require('concat-stream')
55
const once = require('once')
6-
const FileResultStreamConverter = require('../utils/file-result-stream-converter')
76
const SendFilesStream = require('../utils/send-files-stream')
87

98
module.exports = (send) => {
@@ -29,8 +28,7 @@ module.exports = (send) => {
2928

3029
const options = {
3130
args: pathDst,
32-
qs: opts,
33-
converter: FileResultStreamConverter
31+
qs: opts
3432
}
3533

3634
const stream = sendFilesStream({ qs: options })

src/lib/iterable-to-readable-stream.js

Lines changed: 0 additions & 101 deletions
This file was deleted.

src/utils/file-result-stream-converter.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)