pqina / filepond-plugin-file-encode

🗜 Send FilePond Files Along with Form Submit
https://pqina.nl/filepond/
MIT License
13 stars 12 forks source link

Exception: Cannot set property 'data' of undefined #7

Closed timashev closed 5 years ago

timashev commented 5 years ago

Just got bug report from production server:

TypeError: Cannot set property 'data' of undefined at https://github.com/pqina/filepond-plugin-file-encode/blob/36b9cfb8705dacfc5f7b7100593c0b43c714d783/src/js/index.js#L50

So I would suggest to add a check that base64Cache[item.id] is not empty before trying to assign value to base64Cache[item.id].data.

rikschennink commented 5 years ago

Looks like the item was removed while the file was being encoded. PR is welcome.

RahulAnand442001 commented 4 years ago

Just got bug report from production server:

TypeError: Cannot set property 'data' of undefined at

https://github.com/pqina/filepond-plugin-file-encode/blob/36b9cfb8705dacfc5f7b7100593c0b43c714d783/src/js/index.js#L50

So I would suggest to add a check that base64Cache[item.id] is not empty before trying to assign value to base64Cache[item.id].data.

How did you resolve this issue. I am unable to get over it