Skip to content

Commit 00a10d8

Browse files
committed
add sidebar NewNote,Folder Button, Editor fix
1 parent cd01c5d commit 00a10d8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

routers/file.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,13 @@ async def upload_file(
116116
db.add(new_file)
117117
db.commit()
118118
db.refresh(new_file)
119+
120+
base_url = os.getenv("BASE_API_URL", "http://localhost:8000")
121+
download_url = f"{base_url}/api/v1/files/download/{new_file.id}"
122+
119123
return {
120124
"file_id": new_file.id,
125+
"url": download_url,
121126
"original_name": new_file.original_name,
122127
"folder_id": new_file.folder_id,
123128
"content_type": new_file.content_type,

uploads/3/noteflow1.png

10.3 KB
Loading

0 commit comments

Comments
 (0)