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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user