summaryrefslogtreecommitdiff
path: root/std/mime/multipart.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/mime/multipart.ts')
-rw-r--r--std/mime/multipart.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/mime/multipart.ts b/std/mime/multipart.ts
index c46948226..709752290 100644
--- a/std/mime/multipart.ts
+++ b/std/mime/multipart.ts
@@ -308,7 +308,7 @@ export class MultipartReader {
}
// file
let formFile: FormFile | undefined;
- const n = await copy(buf, p);
+ const n = await copy(p, buf);
const contentType = p.headers.get("content-type");
assert(contentType != null, "content-type must be set");
if (n > maxMemory) {
@@ -573,7 +573,7 @@ export class MultipartWriter {
file: Reader
): Promise<void> {
const f = await this.createFormFile(field, filename);
- await copy(f, file);
+ await copy(file, f);
}
private flush(): Promise<void> {