Skip to content

Commit 6d7f072

Browse files
Lin47林仕强
andauthored
为formdata.append增加第三个参数控制文件名称 (#240)
* 为formdata.append增加第三个参数控制文件名称 * fix ci error * fix ci error Co-authored-by: 林仕强 <[email protected]>
1 parent 7af31bf commit 6d7f072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default function upload(option) {
6262
});
6363
}
6464

65-
formData.append(option.filename, option.file);
65+
formData.append(option.filename, option.file, option.file && option.file.name);
6666

6767
xhr.onerror = function error(e) {
6868
option.onError(e);

0 commit comments

Comments
 (0)