parent
009f9c297d
commit
625fd92130
9 changed files with 32 additions and 17 deletions
|
@ -3,7 +3,7 @@ import http from '@/api/http';
|
|||
export default (server: string, file: string): Promise<string> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.get(`/api/client/servers/${server}/files/contents`, {
|
||||
params: { file: file.split('/').map(item => encodeURIComponent(item)).join('/') },
|
||||
params: { file: encodeURI(decodeURI(file)) },
|
||||
transformResponse: res => res,
|
||||
responseType: 'text',
|
||||
})
|
||||
|
|
Reference in a new issue