def media_file(filename): """ Retrieves a media file. """ outfile = media_storage.get_file(filename) return send_file(outfile,mimetype='image/png')