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:
Pontoporeia
2026-07-10 16:36:30 +02:00
parent 7013f79fc0
commit 6da45435f5
2 changed files with 21 additions and 14 deletions
@@ -914,14 +914,17 @@
console.log(`[relink] looking for pond | found=${!!pond}`);
if (pond) {
pond
.addFile(String(data.id), {
type: "limbo",
file: {
name: fileName,
size: fileSize,
type: mimeType,
.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",
file: {
name: name,
size: 0,
type: "video/mp4",
.addFiles([{
source: String(data.id),
options: {
type: "local",
file: {
name: name,
size: 0,
type: "video/mp4",
},
},
})
}])
.then(() => {
console.log("[pt-relink] addFile resolved");
closeModal();