Get basic file upload functionality working

This commit is contained in:
Matthew Penner 2020-07-12 16:42:32 -06:00
parent 3ebb6eadbf
commit 1d2acbd5b4
6 changed files with 152 additions and 9 deletions

View file

@ -0,0 +1,9 @@
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);
});
};