22301009 | 1e2aea7 | 2025-06-08 16:35:54 +0800 | [diff] [blame] | 1 | import axios from "axios"; |
2 | |||||
3 | |||||
4 | export const uploadFile = async (file) => { | ||||
5 | const formData = new FormData(); | ||||
6 | formData.append('file', file); | ||||
7 | return axios.post('/file', formData, { headers: { 'Content-Type': 'multipart/form-data' } }); | ||||
8 | } |