reverted back the file upload function