mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
10 lines
330 B
TypeScript
10 lines
330 B
TypeScript
import http from '@/api/http';
|
|||
|
|
|
||
|
|
export default (uuid: string, file: string): Promise<string> => {
|
||
|
|
return new Promise((resolve, reject) => {
|
||
|
|
http.get(`/api/client/servers/${uuid}/files/download`, { params: { file } })
|
||
|
|
.then(({ data }) => resolve(data.attributes.url))
|
||
|
|
.catch(reject);
|
||
|
|
});
|
||
|
|
};
|