I am using AWS lambda function to receive a multipart request with attachments and upload them to S3.
But Lambda function replaces few characters with the replacement character and so the attachment getting corrupt.
I checked on a PNG file.
sample content: \x89PNG\r\n\u001A\n\u0000\u0000\u0000
All the characters are received as they are but \x89
or in general \x**
getting replaced by the replacement character(U+FFFD).
I am extracting the attachment file_str
as a string and writing into a file and then uploading it to s3.
File.open(file_path, 'w') do |f|
f << file_str
end
Thanks in advance.