Closed
Description
This API probably needs at least two "levels":
- low-level GridFS helpers through the
PyMongo
object, for folks who want to roll their own - high-level view functions for accepting uploads and serving GridFS content (with conditional GET support)
The high-level API might look like this:
@app.route('/uploads/<path:filename>')
mongo.serve_gridfs(collection=uploads)
where serve_gridfs
returns a view function that expects a single "filename" argument. Need to figure out how to set endpoint name so that url_for
works as expected/as configured.