modified same logic of prototype module for file upload.