@@ -0,0 +1,727 @@
+#!/usr/bin/env python%0A# encoding: utf-8%0A%0A# official document: http://flask.pocoo.org/docs/0.10/patterns/fileuploads/%0A%0Afrom flask import Flask, send_from_directory%0Afrom werkzeug import SharedDataMiddleware%0A%0Aapp = Flask(__name__)%0A%0Aapp.config%5B%22FILE_PATH%22%5D = %22.%22   # The path want handdle%0A%0Adef prev_file(filename):%0A    return send_from_directory(app.config.get(%22FILE_PATH%22), filename)%0A%0Aapp.add_url_rule(%22/file/%3Cfilename%3E%22, %22prev_file%22, build_only=True)%0A%0Aapp.wsgi_app = SharedDataMiddleware(%0A    app.wsgi_app,%0A    %7B%0A        %22/file%22: app.config.get(%22FILE_PATH%22)%0A    %7D,%0A    cache = False%0A    # tips: http://stackoverflow.com/questions/11515804/zombie-shareddatamiddleware-on-python-heroku%0A)%0A%0A%0Aif __name__ == %22__main__%22:%0A    app.run()%0A

add flask_file_serve.py