File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -275,8 +275,12 @@ export interface Application extends IBase {
275275 attrs ?: ApplicationAttrs ;
276276}
277277
278- export interface FileInfo {
278+ export interface UploadFileInfo {
279279 id : string ;
280280 post_url : string ;
281281 post_fields : [ string , string ] [ ] ;
282282}
283+
284+ export interface DownloadFileInfo {
285+ url : string ;
286+ }
Original file line number Diff line number Diff line change 1- import { FileInfo } from '@/interface' ;
1+ import { DownloadFileInfo } from '@/interface' ;
22
33import { http } from './request' ;
44
@@ -8,7 +8,7 @@ export async function downloadFile(
88 originalName : string
99) {
1010 try {
11- const fileInfo : FileInfo = await http . get (
11+ const fileInfo : DownloadFileInfo = await http . get (
1212 `/namespaces/${ namespaceId } /resources/${ resourceId } /file` ,
1313 { mute : true }
1414 ) ;
Original file line number Diff line number Diff line change 1- import { FileInfo , IResourceData } from '@/interface' ;
1+ import { IResourceData , UploadFileInfo } from '@/interface' ;
22import { http } from '@/lib/request' ;
33
44export interface UploadProgress {
@@ -13,7 +13,7 @@ async function uploadFile(
1313 parentId : string ,
1414 file : File
1515) : Promise < IResourceData > {
16- let fileInfo : FileInfo ;
16+ let fileInfo : UploadFileInfo ;
1717 try {
1818 fileInfo = await http . post (
1919 `/namespaces/${ namespaceId } /resources/files` ,
You can’t perform that action at this time.
0 commit comments