The issue appears to be caused by these lines which do not use the filename in any way.
I'm happy to put in a fix but I don't know enough about the form data stuff going on in this library and I know there's a lot of backward compatibility so I'd need some guidance on what the right fix is... I'm guessing we should wrap the string body in a Blob before passing to FormData so that we can append the filename.
There's probably some other stuff affected here too....
If I pass an attachment where the data is a string, the filename & contentType are ignored. For instance:
The issue appears to be caused by these lines which do not use the filename in any way.
I'm happy to put in a fix but I don't know enough about the form data stuff going on in this library and I know there's a lot of backward compatibility so I'd need some guidance on what the right fix is... I'm guessing we should wrap the string body in a
Blob
before passing toFormData
so that we can append the filename.There's probably some other stuff affected here too....