Hey Eddie, thanks for reaching out! It would be helpful to see your file, need-help-test at line 162. Based on your error message, that’s where I would look first.

Generally speaking, that error suggests you’re calling addEventListener on something that doesn’t exist. The only place I mention it above is right after accessing a form DOM node using querySelector. In truth, it’s possible that the returned value from querySelector could be null, if there is no form on the page. It may also be possible if your JavaScript executes BEFORE the form is on the page.

As for the 500 error from the server, this might be something you can’t do anything about. A server will determine whether they accept data submitted at all, what type of data, which senders they allow, and much more. So while this post was intended to teach one side of the equation, it’s still necessary for the receiving end to allow for uploads.

I’m happy to discuss in more detail if you like. Maybe we can set up a 30 min call :)