mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 12:16:22 +00:00
Added stuff
This commit is contained in:
parent
571cd8576b
commit
b4694fee2c
5
.gitignore
vendored
5
.gitignore
vendored
@ -180,4 +180,7 @@ outputs
|
||||
test.http
|
||||
|
||||
shared/*
|
||||
!shared/.keep
|
||||
!shared/.keep
|
||||
|
||||
|
||||
uploads
|
8
app.py
8
app.py
@ -84,6 +84,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
# =========================================================================================
|
||||
# Endpoints
|
||||
# =========================================================================================
|
||||
self.add_endpoint("/send_file", "send_file", self.send_file, methods=["POST"])
|
||||
|
||||
|
||||
self.add_endpoint(
|
||||
@ -646,7 +647,12 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
self.process.cancel_generation()
|
||||
return jsonify({"status": "ok"})
|
||||
|
||||
|
||||
def send_file(self):
|
||||
file = request.files['file']
|
||||
Path("uploads").mkdir(exist_ok=True, parents=True)
|
||||
file.save('uploads/' + file.filename)
|
||||
return jsonify({"status": "ok"})
|
||||
|
||||
def rename(self):
|
||||
data = request.get_json()
|
||||
title = data["title"]
|
||||
|
Loading…
Reference in New Issue
Block a user