* Consolidate code and make function out of setting media type.
Attach a file by drag & drop or click to upload