1
0
Fork 0
mirror of synced 2024-07-31 11:01:24 +12:00
appwrite/app/sdks/client-web/docs/examples/storage/update-file.md

14 lines
348 B
Markdown
Raw Normal View History

2020-01-31 09:58:49 +13:00
let sdk = new Appwrite();
sdk
2020-05-28 16:41:25 +12:00
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
2020-02-16 07:22:34 +13:00
.setProject('5df5acd0d48c2') // Your project ID
2020-01-31 09:58:49 +13:00
;
let promise = sdk.storage.updateFile('[FILE_ID]', [], []);
promise.then(function (response) {
2020-02-16 19:27:55 +13:00
console.log(response); // Success
2020-01-31 09:58:49 +13:00
}, function (error) {
2020-02-16 19:27:55 +13:00
console.log(error); // Failure
2020-01-31 09:58:49 +13:00
});