misc_pterodactyl-panel/resources/scripts/api/server/files/getFileUploadUrl.ts

10 lines
292 B
TypeScript
Raw Normal View History

import http from '@/api/http';
export default (uuid: string): Promise<string> => {
return new Promise((resolve, reject) => {
http.get(`/api/client/servers/${uuid}/files/upload`)
.then(({ data }) => resolve(data.attributes.url))
.catch(reject);
});
};