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

Commit 7acec6f

Browse files
author
Alan Shaw
committed
fix: tests
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 6b1aa73 commit 7acec6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/add/form-data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ exports.toFormData = async (input) => {
2323
{ path: file.path || `file-${i}` }
2424
),
2525
{
26-
filepath: file.path,
26+
filepath: encodeURIComponent(file.path),
2727
contentType: 'application/octet-stream',
2828
knownLength: file.content.length // Send Content-Length header if known
2929
}
3030
)
3131
} else {
3232
formData.append(`dir-${i}`, Buffer.alloc(0), {
33-
filepath: file.path,
33+
filepath: encodeURIComponent(file.path),
3434
contentType: 'application/x-directory'
3535
})
3636
}

0 commit comments

Comments
 (0)