Instead of repeating the problem every time, fold this stuff into a function we can use.
Attach a file by drag & drop or click to upload