Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/tests/middlewares/express-fileupload-temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ app.listen(13333, async () => {
arr[i] = i % 256;
}
console.log('appending file');
const file = new File(arr, 'test.txt');
const file = new File([arr], 'test.txt');
formData.append('file', file);

console.log('sending request');
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/middlewares/multer.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ app.listen(13333, async () => {

const formData3 = new FormData();
// 200kb
const bigFile = new File(new Array(Math.floor(1024 * 1024 * 0.2)).fill(0), 'big.txt');
const bigFile = new File([new Uint8Array(Math.floor(1024 * 1024 * 0.2))], 'big.txt');
formData3.append('file', bigFile);

const response3 = await fetch('http://localhost:13333/file', {
Expand Down
Loading