From 4f9bb11444ba7236f28ef1e722100b485c185c7c Mon Sep 17 00:00:00 2001 From: Akshat Agarwal Date: Mon, 27 Apr 2020 01:56:02 +0530 Subject: reorder copyN arguments to match Deno.copy (#4900) --- std/mime/multipart.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/mime') diff --git a/std/mime/multipart.ts b/std/mime/multipart.ts index 709752290..027854dae 100644 --- a/std/mime/multipart.ts +++ b/std/mime/multipart.ts @@ -297,7 +297,7 @@ export class MultipartReader { buf.reset(); if (!p.fileName) { // value - const n = await copyN(buf, p, maxValueBytes); + const n = await copyN(p, buf, maxValueBytes); maxValueBytes -= n; if (maxValueBytes < 0) { throw new RangeError("message too large"); @@ -320,8 +320,8 @@ export class MultipartReader { }); try { const size = await copyN( - file, new MultiReader(buf, p), + file, maxValueBytes ); file.close(); -- cgit v1.2.3