JS detects file extension and posts params to the correct controller.
fixed Image uploads from shared media upload form
Merge pull request #7 from PartyPri/detect-file-type

Upload form handles video and image uploads - detects file time