1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-26 22:00:28 +08:00

finish getFileBlob

This commit is contained in:
源文雨
2023-04-15 23:50:59 +08:00
parent 0e55371ffb
commit 2286438097
5 changed files with 23 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
import { defHttp } from '/@/utils/http/axios'
import { defHttp, paperHttp } from '/@/utils/http/axios'
import { getFileListModel, AnalyzeFile, FileListGroupItem } from './model/fileListModel'
import { DownloadFile, FileStatus } from './model/fileModel'
@@ -57,6 +57,16 @@ export const downloadFile = (id: number) => {
return defHttp.get<DownloadFile>({ url: Api.DlFile, params: { id: id } })
}
/**
* @description: Download file to blob
*/
export const getFileBlob = (url: string) => {
return paperHttp.get<any>({
responseType: 'blob',
url: url,
})
}
/**
* @description: Get file status
*/