mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 05:43:45 +02:00
Encode all parts of the URI individually, closes #2620
This commit is contained in:
@@ -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 },
|
||||
params: { file: file.split('/').map(item => encodeURIComponent(item)).join('/') },
|
||||
transformResponse: res => res,
|
||||
responseType: 'text',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user