mirror of https://github.com/VLSIDA/OpenRAM.git
removed webserver files
This commit is contained in:
parent
7d070c2652
commit
9ef5190d2e
|
|
@ -1,28 +0,0 @@
|
||||||
import requests
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
# TODO
|
|
||||||
# copy directory structure
|
|
||||||
# relative links to not break dataseets?
|
|
||||||
# look into proper string and packet sanitization
|
|
||||||
# index gui + results graphs
|
|
||||||
|
|
||||||
base_url = 'http://localhost:5000/'
|
|
||||||
upload_url = 'upload'
|
|
||||||
|
|
||||||
def send_file(path):
|
|
||||||
upload_file = open(path,'rb')
|
|
||||||
data = {'file' : upload_file}
|
|
||||||
return requests.post(url = base_url + upload_url, files = data)
|
|
||||||
|
|
||||||
def send_mkdir(path):
|
|
||||||
|
|
||||||
def send_directory(path):
|
|
||||||
for root, directories, filenames in os.walk(path):
|
|
||||||
for filename in filenames:
|
|
||||||
upload_file = os.path.join(root,filename)
|
|
||||||
print(upload_file)
|
|
||||||
print(send_file(upload_file))
|
|
||||||
|
|
||||||
send_directory(sys.argv[1])
|
|
||||||
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
test
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
import os
|
|
||||||
from flask import Flask, render_template, request
|
|
||||||
from werkzeug import secure_filename
|
|
||||||
app = Flask(__name__)
|
|
||||||
|
|
||||||
@app.route('/uploader', methods = ['GET', 'POST'])
|
|
||||||
def upload():
|
|
||||||
if request.method == 'POST':
|
|
||||||
f = request.files['file']
|
|
||||||
dirname = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
f.save(dirname + '/uploads/' + secure_filename(f.filename))
|
|
||||||
return 'file uploaded successfully'
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
app.run(debug = True)
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<form action = "http://localhost:5000/uploader" method = "POST"
|
|
||||||
enctype = "multipart/form-data">
|
|
||||||
<input type = "file" name = "file" />
|
|
||||||
<input type = "submit"/>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Loading…
Reference in New Issue