Parse-SDK-Flutter icon indicating copy to clipboard operation
Parse-SDK-Flutter copied to clipboard

Support File Metadata

Open mbfakourii opened this issue 3 years ago • 6 comments

New Feature / Enhancement Checklist

Current Limitation

It is not possible to send metadata along with the file

Feature / Enhancement Description

I suggest to add this possibility in this package, considering the addition of this possibility in Parse Server (PR)

this possibility allows us to send metadata such as file size with the file

Example Use Case

None

Alternatives / Workarounds

Another solution is like adding another field in higher classes, but it may make the schema crowded!

mbfakourii avatar Oct 06 '22 06:10 mbfakourii

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

According to @cbaker6 (this link), I don't think adding these items is necessary.

mbfakourii avatar Dec 20 '22 16:12 mbfakourii

Hi @mbfakourii, my comments in the link you posted were more about the difference of the S3 and FS adapters on the server. If you want the Flutter SDK to support S3 metadata and tags, then the issue you opened is a valid one and you may want to add the feature if it’s missing. You can look at the Swift SDK for guidance. Essentially, the metadata and tags go into the header.

cbaker6 avatar Dec 22 '22 14:12 cbaker6

Hi @mbfakourii, my comments in the link you posted were more about the difference of the S3 and FS adapters on the server. If you want the Flutter SDK to support S3 metadata and tags, then the issue you opened is a valid one and you may want to add the feature if it’s missing. You can look at the Swift SDK for guidance. Essentially, the metadata and tags go into the header.

As far as I heard, S3 is being deprecated and the metadata and tags functions are only used in this adapter. Is it reasonable to work on this issue?

Are metadata and tags used in FS?

mbfakourii avatar Dec 22 '22 16:12 mbfakourii

AWS S3 is not being deprecated. A Parse SDK can always transmit tags / metadata. How that info will be used depends on the storage adapter that Parse Server uses. If the storage adapter supports it, then tags / metadata will be processed, otherwise discarded.

Which storage adapter supports tags / metadata is irrelevant from this SDK's point of view. The only question is whether the SDK is capable of transmitting tags / metadata to the server. Whether a specific storage adapter supports tags / metadata is a question for Parse Server or its storage adapters (some of which have their own repos outside the Parse Sever repo).

The feature of tags / metadata goes beyond S3. For example, Azure's equivalent Blob also supports these tags / metadata.

So yes - it makes absolutely sense to add this feature to the Flutter SDK - and we'd be delighted if you could 🙂

mtrezza avatar Dec 22 '22 18:12 mtrezza

Are metadata and tags used in FS?

This is what the link you posted in https://github.com/parse-community/Parse-SDK-Flutter/issues/794#issuecomment-1359650163 is about. FS currently doesn’t use either. The FS adapter is a simple and useful one and has technically only had 2 code and test development contributors; Flo (original) and myself (mine were a major rewrite and feature addition). The current design is intended for file storage only. Anyone planning to add something else will need to understand the FS adapters current architecture to add it.

cbaker6 avatar Dec 22 '22 18:12 cbaker6