Also cleaned up some syntax where the new API is used.
Attach a file by drag & drop or click to upload