From Rik's answer I would assume the simplest way to integrate is to store the file's information into Alpine.js state post upload by FilePond.
Alpine.store('fileInfo', {
loading: false,
file: null,
setFileInfo(file) {
this.file = file;
}
});
// Alpine initialisation code
// onreadystatechanged wrapper etc
FilePond.create(element, {
// other config
process: {
// other config
onprocessfile: (error, file) => {
Alpine.store('fileInfo').setFileInfo(file);
}
}
})
In your template or in your Alpine component you can do $store.fileInfo.file
or this.$store.fileInfo.file
respectively.
Here are the docs for Alpine.store
: https://alpinejs.dev/globals/alpine-store