IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Commit 192efc9d authored by Suhas CV's avatar Suhas CV
Browse files

upload instructions

parent 90a9d314
......@@ -16,17 +16,20 @@ def hello_world():
@app.route("/convert/",methods=["POST","GET"])
def convert():
if request.method=="POST":
uploaded_file = request.files["latexFile"]
input_file = str(uuid.uuid1())+".zip"
uploaded_file.save(input_file)
k= extractAndConvert(input_file)
zip_io= io.BytesIO(open("static/"+k+".zip",'rb').read())
#zip_data =zipfile.ZipFile(zip_io,'r')
os.remove("static/"+k+".zip")
return send_file(zip_io,mimetype="application/zip")
else:
return redirect(url_for('hello_world'))
try:
if request.method=="POST":
uploaded_file = request.files["latexFile"]
input_file = str(uuid.uuid1())+".zip"
uploaded_file.save(input_file)
k= extractAndConvert(input_file)
zip_io= io.BytesIO(open("static/"+k+".zip",'rb').read())
#zip_data =zipfile.ZipFile(zip_io,'r')
os.remove("static/"+k+".zip")
return send_file(zip_io,mimetype="application/zip")
else:
return redirect(url_for('hello_world'))
except:
return redirect("/")
......
......@@ -2,7 +2,12 @@
{% block content %}
<div >
<h1>Convert Latex to Accessible HTML</h1>
<p>Make sure your latex</p>
<p>Make sure you follow the below instructions before uploading</p>
<ol>
<li>The name of your primary tex file in the project should be "main.tex"</li>
<li>If you would like to add banner to your project(optional step), include the banner image in your project and name it as "headerImage.png"</li>
<li>Compress your project into a zip file</li>
</ol>
<form action="{{ url_for('convert') }}" method="post" enctype="multipart/form-data">
<label for="upload-latex">upload</label>
<input id="upload-latex" name="latexFile" type="file" accept=".zip,.rar,.7zip"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment