Hi there Everyone, it's been a while since I posted. This post is actually kind of related to my last post. basically I have the following jade file:
If you inspect you'll see I have 2 buttons. One that submits the wrong way synchronously, and one that submits the right way asynchronously. When submited synchronously, everything goes fine, with the obvious unfortunate consequence of leading to a blank page because of the action. When submitted asynch, the form functions as it should, however the file that is sent through simply says <ERROR OPENING FILE> . I've logged the stuff in the console and the file is not present in the request sent through, what's really confusing is that it when logging the request in the console via the asynch it does seem to have file in the body of request but trying to log it brings up undefined as so:
I believe there may be something wrong with how I define the object however as I've given it the following structure:
Perhaps I should be making file type object instead of string?
and send it through like so:
It's essentially the same as contact but with a file and the two buttons are round about the same (as far as I understand) but they seem to have such very different results. I'm kinda confused here. Anyone got anything?