Unable to upload image or excel file to s3 in serverless framework

Hello,
I have created a sample serverless framework, it has a function to upload files on s3 but I am facing issues while uploading files. (Files are getting uploaded but it turns out to be corrupt.)
Thanks.