Some more stuff sort of working, started slideshow stuff
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from flask import Blueprint, request, render_template, jsonify, current_app
|
||||
from utilities.tools import get_db
|
||||
from werkzeug.utils import secure_filename
|
||||
import os
|
||||
|
||||
@@ -35,6 +36,13 @@ def upload():
|
||||
|
||||
filename = secure_filename(file.filename)
|
||||
file.save(os.path.join(folder_path, filename))
|
||||
|
||||
get_db().insert(
|
||||
"media",
|
||||
["media_name", "media_uri"],
|
||||
[request.form["name"], os.path.join(folder_path, filename)]
|
||||
)
|
||||
|
||||
return jsonify({
|
||||
'status': 'SUCCESS'
|
||||
}), 200
|
||||
Reference in New Issue
Block a user