Hi guys, thanks for this comunity i have a question?
i have a form with a upload file field, with the embed script works fine, but how i can upload a file to form directly using the API?
with the the api v3
https://api.hsforms.com/submissions/v3/integration/secure/submit/:portalId/:formGuid
Thanks in advanced
@jgaldamez - this is surely a case where I’m misunderstanding the sense of the question. But I will try and interpret as best I can.
I would suggest there isn’t really sense in which you would want to “upload a file to the form” since the form doesn’t really have a life beyond the submit action. I am going to presume what’s perhaps required is an upload of a file to become an attachment to a Contact or other HubSpot object. The direct answer to this is the files API - for axample: https://api.hubapi.com/files/v3/files
In a triumph of under documentation (IMHO), this API misses the logically important step of getting from a client side file path to the server side binary string thats actually required by the API. There are a few threads in the community that try and address this - for example: https://community.hubspot.com/t5/APIs-Integrations/Upload-files-via-Form-API/td-p/224580
Hope this is in some way helpful.
Steve