Closed idavidgeo closed 11 months ago
You actually need to fetch the media asset details.
Use this method instead imagekit.getFileDetails
// Using Callback Function
imagekit.getFileDetails("file_id", function(error, result) {
if(error) console.log(error);
else console.log(result);
});
// Using Promises
imagekit.getFileDetails("file_id")
}).then(response => {
console.log(response);
}).catch(error => {
console.log(error);
});
You actually need to fetch the media asset details. Use this method instead
imagekit.getFileDetails
// Using Callback Function imagekit.getFileDetails("file_id", function(error, result) { if(error) console.log(error); else console.log(result); }); // Using Promises imagekit.getFileDetails("file_id") }).then(response => { console.log(response); }).catch(error => { console.log(error); });
Right, but I want the folder metadata, not the file. I've set metadata variables for the folder via the web dashboard and want to retrieve them via API.
@imagekitio any idea?
I've assigned a custom metadata item to a folder (folder2 in this case). But I can't figure out a way to retrieve it.
imagekit.getFileMetadata('folder/folder2')
doesn't work.