The code is not correct, but at least it doesn't crash anymore.
Attach a file by drag & drop or click to upload