-
-
Notifications
You must be signed in to change notification settings - Fork 272
Description
Is your feature request related to a problem? Please describe.
Storage objects can have associated metadata, this was solved in supabase/storage#439. However, there is nothing in the dart/flutter API that exposes this metadata.
Describe the solution you'd like
Download would need to have a new response type or another method would need to be added:
// old
Future<Uint8List> download(String path, {TransformOptions? transform})
// new method
Future<StorageResponse> downloadWithMetadata(String path, {TransformOptions? transform});
class StorageResponse {
Uint8List data;
Map<string, dynamic> metadata;
}
Similarly, upload needs additional parameters (or new fields in FileOptions?) to allow writing to metadata
Future<String> upload(
String path,
File file, {
FileOptions fileOptions = const FileOptions(),
int? retryAttempts,
StorageRetryController? retryController,
})
Describe alternatives you've considered
Managing my own metadata separately from the storage objects. I'm not a fan of this; the storage schema has a metadata column per object.
Additional context
https://supabase.com/docs/guides/storage/schema/design
This is implemented in the javascript and python libraries afaict: