mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
fix: strip folder prefix from filename in folder upload
This commit is contained in:
parent
89f210bf7e
commit
e7107b751d
1 changed files with 2 additions and 1 deletions
|
|
@ -1565,7 +1565,8 @@ async def folder_upload(
|
|||
|
||||
async def _read_and_save(file: UploadFile, idx: int) -> dict:
|
||||
content = await file.read()
|
||||
filename = file.filename or rel_paths[idx].split("/")[-1]
|
||||
raw_name = file.filename or rel_paths[idx]
|
||||
filename = raw_name.split("/")[-1]
|
||||
|
||||
def _write_temp() -> str:
|
||||
with tempfile.NamedTemporaryFile(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue