fix: reader non trovava file upload (UUID prefix mismatch). Aggiunto stored_filename
This commit is contained in:
1 parent
45f08c8b9b
commit
abfb183e7b
3 files changed
+4
-3
No files matched your search
@@ -88,6 +88,7 @@ def upload():
|
||||
"input_format": input_ext,
|
||||
"output_format": output_format,
|
||||
"filename": filename,
|
||||
"stored_filename": unique_name,
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
}
|
||||
|
||||
currentTaskId = data.task_id;
|
||||
readerFileId = data.filename;
|
||||
readerFileId = data.stored_filename || data.filename;
|
||||
|
||||
// Connect SSE for progress
|
||||
connectSSE(currentTaskId);
|
||||
|
||||
@@ -550,8 +550,8 @@
|
||||
.then((r) => r.json())
|
||||
.then((data) => {
|
||||
if (data.task_id) {
|
||||
const ext = file.name.split(".").pop().toLowerCase();
|
||||
const encoded = encodeURIComponent(data.filename);
|
||||
const stored = data.stored_filename || data.filename;
|
||||
const encoded = encodeURIComponent(stored);
|
||||
// We'll just redirect to reader page after upload completes
|
||||
// For simplicity, redirect immediately
|
||||
window.location.href = `/reader/${encoded}`;
|
||||
|
||||
Reference in new issue
Block a user