Commit 30a99e8c authored by Roman Shishkin's avatar Roman Shishkin

Не храним папку с загрузками в репозитории

parent 3ab2013e
......@@ -67,4 +67,5 @@ node_modules
localConfig.py
productionConfig.py
.DS_store
package-lock.json
\ No newline at end of file
package-lock.json
uploads
\ No newline at end of file
......@@ -12,8 +12,7 @@ def init(app):
if check_user(app.config['APP_ID'], id, app.config['APP_SECRET'], key) is False:
return render_template('error.html')
print(request.files)
if request.method == 'POST' and 'file' in request.files:
filename = photos.save(request.files['file'])
return json.dumps({'filename':filename})
return json.dumps({'filename':photos.url(filename)})
return json.dumps({'error':True})
\ No newline at end of file
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