Again, instead of a switch statement, just use a callback.
Attach a file by drag & drop or click to upload