Why my upload field is throwing error while attaching file?