Hi,
In my app I serve files from GridFS. Every file contains also some metadata. Now I have two possibilities to serve the metadata:
1. Serve it directly with the collection API
2. Serve it with the GridFS API
My idea was it to unify the model and the access to the file content as also the metadata. So I thought I create one model with the file specific data (md5, filename, ...) and the metadata. The model gets also a "content" property from type Option[Enumerator[Array[Byte]]].
The issue that I have is that sometimes I need only the metadata to show it in a table. So, If I use the GridFS API to query all the data, is there a lot of overhead if I do not use the content? The content is of type Enumerator[Array[Byte]], so there should not be more overhead if I do not consume the file, right? If there is more overhead, then I think it would be better to separate the file content and metadata retrieval, right?
And information would be highly appreciated.
Best regards,
Christian