added thumbnail support to file upload