import request from '@/utils/request'

// 文件上传
export function uploadImage(file) {
    const data = new FormData()
    data.append('file', file)
    return request({
        url: '/common/uploadImage',
        method: 'post',
        data
    })
}


export function uploadTest(file,name,md5,current,total) {
    const data = new FormData()
    data.append('data', file)
    data.append('name', name)
    data.append('md5', md5)
    data.append('current', current)
    data.append('total', total)
    return request({
        url: '/common/uploadFileSlice',
        method: 'post',
        data
    })
}