Proper check if if trying to upload a null file.
Uploading attachments to tickets now actually works.

It required a change in my RedmineREST API, BTW.