mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
feat(mime): make createPart of MultipartWriter public (#960)
This commit is contained in:
parent
810667defc
commit
f898e387a9
@ -581,7 +581,7 @@ export class MultipartWriter {
|
||||
return `multipart/form-data; boundary=${this.boundary}`;
|
||||
}
|
||||
|
||||
private createPart(headers: Headers): Deno.Writer {
|
||||
createPart(headers: Headers): Deno.Writer {
|
||||
if (this.isClosed) {
|
||||
throw new Error("multipart: writer is closed");
|
||||
}
|
||||
@ -598,7 +598,10 @@ export class MultipartWriter {
|
||||
return part;
|
||||
}
|
||||
|
||||
createFormFile(field: string, filename: string): Deno.Writer {
|
||||
createFormFile(
|
||||
field: string,
|
||||
filename: string,
|
||||
): Deno.Writer {
|
||||
const h = new Headers();
|
||||
h.set(
|
||||
"Content-Disposition",
|
||||
|
Loading…
Reference in New Issue
Block a user