How to upload a file using Hubspot File Uploading API with Nodejs, Axios AWS Lambda,
i,m using a lambda function to send clients side uploaded files to the hubspot api. On the client side I encode the file to base64 and then invoke the lambda function with the data. I,m trying to upload the base64 Encoded file, but I can't find the proper way to pass the file or what the api expects. I was only able to find this line:
"“file”: {binary data}"
The error I receive is:
Error: Request failed with status code 400
I think the only thing that goes wrong is passing the file, but i dont know what format the api expects because the documentation are not that clear. Also the error response isn't very helpfull either.
Are all the values of thevar optionscorrectly filled in?
How to correctly pass the file file: Buffer.from(event.data.drawing, 'base64'),?
Is there any way to get more helpfull axios error responses or debugging advice?