Closed ghost closed 5 years ago
app/static/data
(should be in .gitignore)
added 79fd24f26b4c83039c9be2a538e6124b8726d0d3
curl -s -H "Content-Type: application/json" -H "Accept: application/json" -H "API-Authorization:
needs 2 new config params
DATA_DIR="data" # must be placed under app/static/ DATA_SUFFIX="json.zip"
so files must be named
Without a Content-Disposition header from the backend I cannot easily control the filename of the download file because the attribute download="events.json.zip" will be ignored if the same-origin policy is violated.
we are currently using send_static_file() which is only supposed to be used internally and doesnt support setting headers. the better approach is probably to use send_file() we need to find out if FlaskApi supports it first.
http://flask.pocoo.org/docs/0.12/api/#flask.send_file
https://www.programcreek.com/python/example/58917/flask.send_file
It works.
The filename is still download_events
.
Created #77 for minor issues/feature requests
Procedure:
@MarkHofstetter Please provide the name of the directory the files should be