|
|
@ -55,10 +55,10 @@ def query(filter, query):
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/parts/getfile/<filename>')
|
|
|
|
@app.route('/parts/getfile/<filename>')
|
|
|
|
def getfile(filename):
|
|
|
|
def getfile(filename):
|
|
|
|
if(re.match('^[\w\-_]+\.pdf$', filename) == None):
|
|
|
|
if(re.match('^[\w\-_]+$', filename) == None):
|
|
|
|
return 'No injections pls.'
|
|
|
|
return 'No injections pls.'
|
|
|
|
|
|
|
|
|
|
|
|
return send_from_directory('/srv/datasheets/', 'filename')
|
|
|
|
return send_from_directory('/srv/datasheets/', filename + '.pdf')
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/parts/alter/<partID>', methods=['POST'])
|
|
|
|
@app.route('/parts/alter/<partID>', methods=['POST'])
|
|
|
|
def alter(partID):
|
|
|
|
def alter(partID):
|
|
|
|