import request from '@/utils/request'

/**
 * 预览
 */
export function openPng(id) {
    // debugger;`/v2/api/enforce-job/${id}`
    return request.get('/v2/api/file/'+id+'/open')
}

export function exportFile(id) {
    return request.get(`/v2/api/file/${id}`,{responseType: 'blob'})
}

export function upload(name, file) {
    const form = new FormData();
    form.append('fileName', name);
    form.append('fileBinary', file);
    return request.post('/v2/api/file', form)
}