Loading...
Asked by Kaushik on Jun 11, 2024
Kaushik is asking how to upload an image file selected via a local form input to the HubSpot File Manager using an API.
Answered by Joshua Beatty
Joshua suggests getting the file blob from the input, base64 encoding it, passing it to a serverless function, decoding it back to a blob, and then uploading it to the HubSpot File system. He shared a Stack Overflow link demonstrating how to get base64 encoded data from a form input using FileReader.