In my Cordova app, the user may take pictures or videos with the device camera and upload them. So I need a reliable way of dealing with rich media on the server side.
My first - prototypical - approach was to store the data as base64 in Mongo collections (for each media type), but I don’t think this is a good solution and would prefer a kind of server-side file storage that can also be accessed via http:// URLs.
I came across CollectionFS, which seems very promising. However, they clearly state in the GitHub repository: ‘… don’t use in production yet.’ This is not really what I am looking for (maybe it’s just a safety statement, but who knows?).
So I am wondering if there are any other approaches to this scenario out there that allow upload and retrieval of rich media files?
It would also be perfect if this solution would be able to cache these files locally in a Cordova app, just like MiniMongo does, to provide a better end-user experience and buffer connection losses.
One last question I have in mind regarding this: Is there any restriction on the size of Session variables? Background: As I said earlier, I’m currently storing images (only) inside MongoDB as base64 data. If a user enters a template using these images, I retrieve them from the database and store them - together with the overall model document - in a session variable. But I doubt this is a good idea, since I assume these Session variables are being stored in browser-side stores like cookies or HTML5 web storage. This is also the reason why I am looking for a solution that would allow me to retrieve the images via an HTTP URL.