misc_pterodactyl-panel/resources/scripts/api/server/files/getFileUploadUrl.ts
2020-07-12 16:42:32 -06:00

9 lines
292 B
TypeScript

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);
});
};