commit | 1e2aea77d13c07c79d6cb36e4757fca5a88b7633 | [log] [tgz] |
---|---|---|
author | 22301009 <22301009@bjtu.edu.cn> | Sun Jun 08 16:35:54 2025 +0800 |
committer | 22301009 <22301009@bjtu.edu.cn> | Sun Jun 08 19:37:50 2025 +0800 |
tree | 43b656ef3f53509af6a5ebc0fe17214ede00437b | |
parent | 13aae31af1dd5f243fc1e2c0ae46cf929039c00f [diff] [blame] |
修改提示框样式、完成付费片单、推荐跳转 Change-Id: Ie84c53d4e306435144b1f26ceb39cc182e99d57a
diff --git a/src/api/file.js b/src/api/file.js new file mode 100644 index 0000000..fdfe571 --- /dev/null +++ b/src/api/file.js
@@ -0,0 +1,8 @@ +import axios from "axios"; + + +export const uploadFile = async (file) => { + const formData = new FormData(); + formData.append('file', file); + return axios.post('/file', formData, { headers: { 'Content-Type': 'multipart/form-data' } }); +} \ No newline at end of file