mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 07:11:18 +02:00
fix: relinked files now appear in FilePond UI immediately
Switched from pond.addFile(type:'limbo') to pond.addFiles([{source, options:{type:'local'}}])
in both XamxamRelinkFile and XamxamRelinkPeerTube.
addFile with type 'limbo' doesn't trigger server.load to fetch the file
for the preview/thumbnail. The data-existing-files format (type:'local')
correctly tells FilePond to call server.load for the file identified by
the source (DB ID), rendering it properly in the pool.
This commit is contained in:
@@ -14,3 +14,4 @@
|
||||
- [x] Fix cleanup stats: use sidecar JSON for restorability classification (not DB row existence)
|
||||
- [x] Remove destructive HTMX fragment refresh from relink flow (close modal only, pond.addFile in-place)
|
||||
- [x] Merge corbeille lists into single table with status column + bulk restore button
|
||||
- [x] Fix relinked file not appearing in FilePond UI: use addFiles([{type:'local'}]) instead of addFile(type:'limbo')
|
||||
|
||||
@@ -914,14 +914,17 @@
|
||||
console.log(`[relink] looking for pond | found=${!!pond}`);
|
||||
if (pond) {
|
||||
pond
|
||||
.addFile(String(data.id), {
|
||||
type: "limbo",
|
||||
.addFiles([{
|
||||
source: String(data.id),
|
||||
options: {
|
||||
type: "local",
|
||||
file: {
|
||||
name: fileName,
|
||||
size: fileSize,
|
||||
type: mimeType,
|
||||
},
|
||||
})
|
||||
},
|
||||
}])
|
||||
.then(() => {
|
||||
console.log(
|
||||
"[relink] addFile resolved | source=" +
|
||||
@@ -1021,14 +1024,17 @@
|
||||
var pond = FilePond.find(input);
|
||||
if (pond) {
|
||||
pond
|
||||
.addFile(String(data.id), {
|
||||
type: "limbo",
|
||||
.addFiles([{
|
||||
source: String(data.id),
|
||||
options: {
|
||||
type: "local",
|
||||
file: {
|
||||
name: name,
|
||||
size: 0,
|
||||
type: "video/mp4",
|
||||
},
|
||||
})
|
||||
},
|
||||
}])
|
||||
.then(() => {
|
||||
console.log("[pt-relink] addFile resolved");
|
||||
closeModal();
|
||||
|
||||
Reference in New Issue
Block a user