This avoids some code duplication that existed before and will make further modifications easier.
Attach a file by drag & drop or click to upload