You need to sign in to do that
Don't have an account?

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
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
may I request you to please check the below link for Reference
I hope it will be helpful.
BestRegards
RahulKumar