More work on file upload