Skip to content
Snippets Groups Projects
Commit 5093fdf6 authored by Sarra Ouelhadj's avatar Sarra Ouelhadj
Browse files

Heroku fixings

parent 315f77be
No related branches found
No related tags found
No related merge requests found
web: gunicorn YKWIM:app
init: FLASK_APP=run.py
\ No newline at end of file
web: gunicorn YKWIM:app
\ No newline at end of file
......@@ -9,7 +9,7 @@ def index():
datasetURL=request.form["datasetURL"]
file = request.files["templateFile"]
file.save(os.path.join(app.config['UPLOAD_FOLDER'],secure_filename(file.filename)))
uml_image = pl.plantUML2Image(app.config['UPLOAD_FOLDER']+secure_filename(file.filename), "svg")
uml_image = pl.plantUML2Image(app.config['UPLOAD_FOLDER']+secure_filename(file.filename))
return render_template("index.html", uml_image=url_for('getDocumentLink',document_link=uml_image))
else:
return render_template("index.html")
......@@ -17,5 +17,5 @@ def index():
@app.route("/<document_link>")
def getDocumentLink(document_link):
return redirect("/tmp/"+document_link)
return send_from_directory(app.config['UPLOAD_FOLDER'],document_link)
#send_from_directory(app.config['UPLOAD_FOLDER'],document_link)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment