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
Richa Sharma 7Richa Sharma 7 

Upload image using rest api from simple html form and apex

I am having difficulty in image upload, as my image is not getting uploaded to external system when I use httprequest. Please help.

I am using simple html form to post content to external site. Image is not getting posted as image is not bounded with an apex variable in controller.
Ankit Gupta@ DeveloperAnkit Gupta@ Developer
Hi Richa,

You will have to convert the image body in base64 before sending to external system in apex class.
If you have any document of external system. Follow the same process to upload the image.

Regards
Ankit Gupta