def send_blob_download():
    def wrapper(fn):
        @wraps(fn)
        def decorated(*args, **kw):
            data, filename, contenttype = fn(*args, **kw)
            headers = {
                'Content-Type': contenttype,
                'Content-Encoding': contenttype,
                'Content-Disposition': 'attachment; filename={}'.format(filename)}
            return Response(data, headers=headers)
        return decorated
    return wrapper
Sender, user_agent, and ip_address should be set on form_valid.
dataset/ETHPy150Open gregorynicholas/flask-gae_blobstore/flask_gae_blobstore.py/send_blob_download--crossover with--dataset/ETHPy150Open ofa/connect/open_connect/connectmessages/tests/test_views.py/MessageCreateViewTest.test_form_valid_x_forwarded_for_missing