function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gomennasai123@n.orggomennasai123@n.org 

How do I pass a base64 string to a apex string in controller?

I want to create a Json string that has a document that shows base64
ex.
{ "first name" : "Rob, "mypdfdoc" : "AAASDECgtNhr==" }

when I pass the file to JavaScript it encodes it to base64 .
when I pass it back to a string type in my controller it shows [file type object]
not AAASDEC...
Any ideas why it is not showing it as a base64 string, instead displays [file type object] in the debug log?
Basically I want to take the base64 string and use put to assign to a map
thank you
 
Akhil AnilAkhil Anil
Hello,

Can you paste snippets of your code, so that we can check what's going wrong ?