I need a little help using pinia-plugin-persistedstate.
I am trying to persist my store where I am saving files downloaded from S3
here is my store:
export const useScanStore = defineStore('scans', {
state: () => {
return {
scanList: [] as ScanInfo[],
}
},
getters:{
getScan:(state) => {
return (id: string) => {
return state.scanList.find(scan => scan.id === id);
}
}
},
actions: {
addScan(id: string, file: File){
this.scanList.push({id, file})
}
},
persist:true,
})
interface ScanInfo {
id: string
file: File
}
After refresh, I get a hit in the store (getScan returns a Scan object). However, the file seems to be missing (I get a A Proxy with an empty target)
Any help appreciated. Thanks