feat: add upload image payback
This commit is contained in:
@@ -50,13 +50,16 @@ export const http = {
|
||||
return req;
|
||||
},
|
||||
upload: (file) => {
|
||||
const request = superagent
|
||||
.post(appConfig.apiUrl + '/files')
|
||||
let req = superagent
|
||||
.post(appConfig.apiUrl + '/config/upload-files')
|
||||
.attach('file', file)
|
||||
.use(authIntercept)
|
||||
.use(attachSuperagentLogger);
|
||||
if (TokenUtil.accessToken) {
|
||||
req = req.set('Authorization', 'Bearer ' + TokenUtil.accessToken);
|
||||
}
|
||||
|
||||
return request;
|
||||
return req;
|
||||
},
|
||||
uploadAntd: (args) => {
|
||||
const file = args.file;
|
||||
|
||||
Reference in New Issue
Block a user