How to avoid PostgREST escaping newlines in a large(ish) text column (containing BASE64 encoded binary data) #3928
-
Hi! I have a table (a view, actually, but that doesn't matter) where one of the columns is BASE64 encoded binary data generated by the I would like to avoid having to replace these escapes with linefeeds on the receiving end. How to politely ask PostgREST not to mangle my long text columns? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Exactly. So that won't change. Also, because you'd need PostgreSQL to change, not PostgREST. We are not doing the transformation to JSON, PostgreSQL does.
Does it need to be? I remember returning base64 somewhere, too, and IIRC, I just removed all newlines on the server to get back a continuous string. Much easier to work with. |
Beta Was this translation helpful? Give feedback.
This is about "Base64 Content-Transfer-Encoding". PostgreSQL creates that, yes.
But delivering base64 inlined in JSON has nothing to do with "Content-Transfer-Encoding" or MIME at all.
Also, it strikes me as odd that you are citing an RFC, while asking us to return non-standard-compliant JSON instead...