You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran into an issue with FormData producing the following error.
ERRO[0309] TypeError: Cannot read property 'filename' of undefined
I found this condition is accessing "filename" with out evaluating p.file even exists
if (p.file.filename) { cd += '; filename="' + p.file.filename.replace(/"/g,'%22') + '"'; }
I had to update the condition to test for the existance of both.
// Check if p.file and p.file.filename exist before using if (p.file && p.file.filename) { cd += '; filename="' + p.file.filename.replace(/"/g,'%22') + '"'; }
The text was updated successfully, but these errors were encountered:
Ran into an issue with FormData producing the following error.
ERRO[0309] TypeError: Cannot read property 'filename' of undefined
I found this condition is accessing "filename" with out evaluating p.file even exists
if (p.file.filename) { cd += '; filename="' + p.file.filename.replace(/"/g,'%22') + '"'; }
I had to update the condition to test for the existance of both.
// Check if p.file and p.file.filename exist before using if (p.file && p.file.filename) { cd += '; filename="' + p.file.filename.replace(/"/g,'%22') + '"'; }
The text was updated successfully, but these errors were encountered: