Get basic file upload functionality working
This commit is contained in:
parent
3ebb6eadbf
commit
1d2acbd5b4
6 changed files with 152 additions and 9 deletions
9
resources/scripts/api/server/files/getFileUploadUrl.ts
Normal file
9
resources/scripts/api/server/files/getFileUploadUrl.ts
Normal 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);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue