I have an application that lists the files uploaded by a user. I'm using Storage.list() for this. I would like to use each file's metadata (x-amz-meta-owner) to enable/disable a button. For now, I'm using Storage.get() with download:true to get the metadata, (I've added x-amz-meta-owner in the CORS configuration). I've found this to be slow and expensive, as it has to download each file as a UIntArray. Is there a more efficient way to get the metadata for each file than this?
Thank you.
@sandeshakya interesting request. Can you go deeper into your use case and what you're trying to build so that we can look at this further from a feature perspective?
@undefobj for my use case, I want to set the disabled attribute based on a metadata attribute for a file. But for a more general case, an option to return the objects' metadata might also help in filtering, using metadata to conditionally render certain objects, without having to download every object in a folder.
Corresponding method in aws-sdk-js: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#headObject-property
So this is specifically for LIST operations?
@powerful23 , that's the kind of functionality I was hoping could be added to Amplify. Good find. Thank you.
@undefobj , might make more sense to have it in the Get operation, similar to @powerful23's post.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm trying to do this as well.
Most helpful comment
I'm trying to do this as well.