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
Steven Berg 5Steven Berg 5 

Why does apex string say [object file] but javascript show base64 string.

I am passing a pdf file to Javascript.
It converts the file to a string using  readAsDataURL.
When I  attempt to pass this to a string in the apex controller it shows it as [objetc file] not as a base64 string.
How do I take the javascript base64 string and pass it to apex so it shows as a base64 string?

For example In javascript I have a variable mydoc.
mydoc shows AAAAGHV/LOP which is a base64 string
when I pass this using apex param actionFunction the apex string shows [object file]
I would like it to show the same value as the javascript variable which is AAAAGHV/LOP
Rahul KumarRahul Kumar (Salesforce Developers)