dimagi/MediaUploader — pull request #6 by emord (2014-12-26 00:59:05+00:00)
Title: Update extension based on file uploaded

http://manage.dimagi.com/default.asp?151390#844016

Might not be the best place to put this code. (First foray into MediaUploader). From my testing it will still check the supported file types that were passed in during initialization, so it shouldn't be a worry.

Reason I did this:
Vellum passes in the path it wants the multimedia saved to, and this returns a path once it has been saved. If the path is not of the correct extension the user has to know to go into advanced path, change the extension, then try to upload again. Here once the file is uploaded the extension is changed, and the final filepath is returned to Vellum