From 9434d7c0273184bb6ff653ded4f49b59041aa50e Mon Sep 17 00:00:00 2001 From: Gabriel Massadas Date: Sun, 1 Dec 2024 19:20:42 +0000 Subject: [PATCH] Add metadata edit --- packages/dashboard/src/appUtils.js | 5 +- .../src/components/files/FileOptions.vue | 48 +++++++++++++++++++ .../src/pages/files/FileContextMenu.vue | 6 +++ .../src/pages/files/FilesFolderPage.vue | 4 +- 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/packages/dashboard/src/appUtils.js b/packages/dashboard/src/appUtils.js index c692378..bb30241 100644 --- a/packages/dashboard/src/appUtils.js +++ b/packages/dashboard/src/appUtils.js @@ -133,14 +133,15 @@ export const apiHandler = { newKey: encode(newKey), }); }, - updateMetadata: async (bucket, key, metadata) => { + updateMetadata: async (bucket, key, customMetadata, httpMetadata = {}) => { let prefix = ""; if (key.includes("/")) { prefix = key.replace(key.split("/").pop(), ""); } const resp = await api.post(`/buckets/${bucket}/${encode(key)}`, { - customMetadata: metadata, + customMetadata: customMetadata, + httpMetadata: httpMetadata, }); if (resp.status === 200) { diff --git a/packages/dashboard/src/components/files/FileOptions.vue b/packages/dashboard/src/components/files/FileOptions.vue index dacb3fe..5ade6e9 100644 --- a/packages/dashboard/src/components/files/FileOptions.vue +++ b/packages/dashboard/src/components/files/FileOptions.vue @@ -30,6 +30,20 @@ + + + + + + + + + + + + + +