Open dudilugasi opened 5 days ago
Interesting, I don't know much about ruby or base64 decoding specifics but if you're able to try editing here
You can apparently swap it to Base64.strict_decode64
but I don't know if that is any better or worse. I doubt the database is doing any line ending conversion and this seems to be one of the few places the attachment could be altered.
I don't know if it is related to the decode64 i've tried this code block:
require "base64"
require "json"
str1 = Base64.decode64("dGVzdAp0ZXN0CnRlc3QK")
str2 = Base64.decode64("dGVzdA0KdGVzdA0KdGVzdA")
puts str1.to_json
puts str2.to_json
and got this output:
"test\ntest\ntest\n"
"test\r\ntest\r\ntest"
so the Base64.decode64
is actually working ok in ruby
Describe the bug
I am sending an text attachment with LF in the api but the attachment is received with CR LF
this is an issue because my client is comparing hashes and becuase of that the hashes are not the same
To Reproduce
Expected behaviour
The attachment should be exactly how sent it
Environment details