Site name: blushbasics.netlify.app
Framework: remix
We’ve created a form on the front-end that accepts a file upload. We’re using Mailjet to send an email with the file as an attachment on the server-side. Attachments are required to be base64 encoded (using fs.readFileSync(file.filepath, "base64") to encode the file).
In development, the attachment works perfectly in the email. In production (on Netlify), I still get an attachment in the email, but it’s broken.
The development base64 string (first line) looks like this: 9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYn
The production base64 string (first line) looks like this: 77+977+977+977+9AEMABgQFBgUEBgYFBgcHBggKEAoKCQkKFA4PDBAXFBgYFxQWFhodJR8aGyMc
Could anyone point me in the right direction on what’s happening on the Netlify side of things not happening on the development side?
Okay, I did see the body is coming out as base64 encoded. I tried working with it but it seems like the file upload still gets corrupted for whatever reason.
While waiting for a response I reached out on the Remix Netlify Discord channel and it appears that they’re looking into it (Discord).