想要实现图片上传我们需要知道其中的原理,下面有几个 api 需要大家掌握
FormData
是一个用来保存 form 表单数据的构造器
方法:
- append
- delete
- get
- getAll
- keys
- values
- entries
- set
- has
前端
1 | <!DOCTYPE html> |
后端
1 | var fs = require("fs"); |
I'm so cute. Please give me money.
- Post link: https://blog.gaocaipeng.com/2020/09/23/uyy5m8/
- Copyright Notice: All articles in this blog are licensed under unless otherwise stated.