working version of direct file upload.