Handle upload errors by rescuing them but sending them to sentry. Extract more functions.
Attach a file by drag & drop or click to upload