Use same function to detect mimetypes in flash & quick upload.

I updated the flash_upload_file function to detect mimetypes the same way the quickupload function does. /cc @buchi