mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
merged
This commit is contained in:
commit
1278c3230a
11 changed files with 80 additions and 6 deletions
|
@ -1,7 +1,10 @@
|
|||
import {
|
||||
IResultWithStatus, IFile, IUploadProgressHandler, IFileWithUUID,
|
||||
} from '~/redux/types';
|
||||
import { api, configWithToken } from '~/utils/api';
|
||||
import {
|
||||
api, configWithToken, resultMiddleware, errorMiddleware,
|
||||
} from '~/utils/api';
|
||||
|
||||
import { API } from '~/constants/api';
|
||||
|
||||
export const postUploadFile = ({
|
||||
|
@ -21,5 +24,7 @@ export const postUploadFile = ({
|
|||
API.USER.UPLOAD(target, type),
|
||||
data,
|
||||
configWithToken(access, { onUploadProgress: onProgress })
|
||||
.then(resultMiddleware)
|
||||
.catch(errorMiddleware)
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue