Skip to content

Commit 06b4252

Browse files
committed
f
1 parent 1588c90 commit 06b4252

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FormData.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'node:path';
22
import _FormData from 'form-data';
33

44
// eslint-disable-next-line
5-
const ASCII_RE = /[^\x00-\x7F]/i;
5+
const NON_ASCII_RE = /[^\x00-\x7F]/i;
66

77
export class FormData extends _FormData {
88
_getContentDisposition(value: any, options: any) {
@@ -28,7 +28,7 @@ export class FormData extends _FormData {
2828
// https://datatracker.ietf.org/doc/html/rfc6266#section-4.1
2929
// support non-ascii filename
3030
contentDisposition = 'filename="' + filename + '"';
31-
if (ASCII_RE.test(filename)) {
31+
if (NON_ASCII_RE.test(filename)) {
3232
contentDisposition += '; filename*=UTF-8\'\'' + encodeURIComponent(filename);
3333
}
3434
}

0 commit comments

Comments
 (0)