Hey, @PieterVHeerden Thanks for your question!
I don’t see an error message in your post. Can you add it here as a reply? Pasting it in and using the code block tool is best, as extracting the error messages and searching with them is hard with from just a screenshot.
I have a few questions:
Could you please provide the full error message you’re encountering? This can often give us more insight into what’s going wrong.
Can you share a sample of your request, including the URL, headers, and body, along with the response you receive? You can just copy and paste this from Postman. Please remember to exclude any sensitive information.
Are you confident that your base64 string is a valid representation of the file you’re trying to upload? Mis-formatted or corrupted base64 strings can cause issues when uploading files.
Please see below. If i upload a file in postman it works. once I change file to be text in the body, that is when it fails. If i add fileName in the body, this yields the same error
Could you please provide the full error message you’re encountering? This can often give us more insight into what’s going wrong.
Can you share a sample of your request, including the URL, headers, and body, along with the response you receive? You can just copy and paste this from Postman. Please remember to exclude any sensitive information.
Are you confident that your base64 string is a valid representation of the file you’re trying to upload? Mis-formatted or corrupted base64 strings can cause issues when uploading files <== Yes if i take the same sting in C# then it uploads
I am passing a Base64 encored file (this is the only part I am not fully sure of).
But other than that, everything is according to the docs. I run plenty of API calls through Hubspot with the same authentication so I assume that’s not the problem either.
is there any way we can get help?
Thank you all for reaching out to the Community and sharing the details of your experience with the file upload endpoint — it definitely helps to see multiple users encountering the same behavior.
I’d like to invite some of our community members who are subject matter experts to join this conversation: Hey @SteveHTM@RubenBurdin@d-lupo Happy Friday! Would you be able to share any insights on uploading Base64-encoded files via /files/v3/files and the “Could not determine name from file” error? Your expertise would be greatly appreciated.
Hi everyone, thanks to all of you for the details you’ve shared so far.
That Could not determine name from file error is coming from how the multipart body is built. When file is sent as a text field with a base64 string (instead of a real file upload), the part doesn’t have a filename, so /files/v3/files can’t infer one and returns this error. The fix is to send file as an actual file part with a filename (or decode your base64 to bytes and append it as the file field with something like my-document.pdf as the filename), and keep options and folderPath as separate form fields. You don’t need a separate fileName field; the API reads the filename from the file part itself.