aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDat Nguyen <nguy2854@umn.edu>2019-11-21 14:07:10 -0600
committerDat Nguyen <nguy2854@umn.edu>2019-11-21 14:07:10 -0600
commit97fa715c87c72541c83e463d8c1e82315fb471a9 (patch)
tree3230020c8cbfd00fbc28939baf012b960381b868
parentworking web stuff with running page (diff)
downloadee4511w-97fa715c87c72541c83e463d8c1e82315fb471a9.tar
ee4511w-97fa715c87c72541c83e463d8c1e82315fb471a9.tar.gz
ee4511w-97fa715c87c72541c83e463d8c1e82315fb471a9.tar.bz2
ee4511w-97fa715c87c72541c83e463d8c1e82315fb471a9.tar.lz
ee4511w-97fa715c87c72541c83e463d8c1e82315fb471a9.tar.xz
ee4511w-97fa715c87c72541c83e463d8c1e82315fb471a9.tar.zst
ee4511w-97fa715c87c72541c83e463d8c1e82315fb471a9.zip
fixed space
Diffstat (limited to '')
-rw-r--r--Web/Server/Server.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Web/Server/Server.py b/Web/Server/Server.py
index 0c3013b..f61419a 100644
--- a/Web/Server/Server.py
+++ b/Web/Server/Server.py
@@ -41,13 +41,14 @@ def upload_file():
# Send the file content as a post to the PI
if file and allowed_file(file.filename):
+
dictToSend = {'filename':file.filename, 'file_content':file.read()}
file.close
print('Running test')
flash('Running test')
response = requests.post(PI_URL + '/tests/endpoint', json=dictToSend)
- results_filename = json.loads(response.text)[u'results_filename'] .encode("ascii")
+ results_filename = json.loads(response.text)[u'results_filename'].encode("ascii")
results_content = json.loads(response.text)[u'results_content'].encode("ascii")
flash('Results file:' + results_filename)
flash('Response from server:' + results_content)
@@ -58,7 +59,7 @@ def upload_file():
return render_template('index.html', results = 'True')
else:
- flash('Allowed file types are txt, pdf, png, jpg, jpeg, gif')
+ flash('Allowed file types are .py')
return redirect(request.url)
@app.route('/results', methods=['GET'])