Commits

Anonymous committed 66e5ca9

fixed bug that prevented files from actually being served

Comments (0)

Files changed (1)

flaskext/uploads.py

 
 @uploads_mod.route('/<setname>/<path:filename>')
 def uploaded_file(setname, filename):
-    config = app.upload_set_config.get(setname)
+    config = current_app.upload_set_config.get(setname)
     if config is None:
         abort(404)
-    send_from_directory(config.destination, filename)
+    return send_from_directory(config.destination, filename)
 
 
 class TestingFileStorage(FileStorage):