mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 15:21:22 +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] 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] 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] 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}`);
|
console.log(`[relink] looking for pond | found=${!!pond}`);
|
||||||
if (pond) {
|
if (pond) {
|
||||||
pond
|
pond
|
||||||
.addFile(String(data.id), {
|
.addFiles([{
|
||||||
type: "limbo",
|
source: String(data.id),
|
||||||
file: {
|
options: {
|
||||||
name: fileName,
|
type: "local",
|
||||||
size: fileSize,
|
file: {
|
||||||
type: mimeType,
|
name: fileName,
|
||||||
|
size: fileSize,
|
||||||
|
type: mimeType,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
}])
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log(
|
console.log(
|
||||||
"[relink] addFile resolved | source=" +
|
"[relink] addFile resolved | source=" +
|
||||||
@@ -1021,14 +1024,17 @@
|
|||||||
var pond = FilePond.find(input);
|
var pond = FilePond.find(input);
|
||||||
if (pond) {
|
if (pond) {
|
||||||
pond
|
pond
|
||||||
.addFile(String(data.id), {
|
.addFiles([{
|
||||||
type: "limbo",
|
source: String(data.id),
|
||||||
file: {
|
options: {
|
||||||
name: name,
|
type: "local",
|
||||||
size: 0,
|
file: {
|
||||||
type: "video/mp4",
|
name: name,
|
||||||
|
size: 0,
|
||||||
|
type: "video/mp4",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
}])
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log("[pt-relink] addFile resolved");
|
console.log("[pt-relink] addFile resolved");
|
||||||
closeModal();
|
closeModal();
|
||||||
|
|||||||
Reference in New Issue
Block a user