I’m trying to upload .docx files using Python but the request fails with the following reason: Content-Type 'multipart/form-data; boundary=faf8b18ba37a8f5539d693a894d10cfb' is not supported
The docs mentioned I should be using multipart/form-data, so that error is confusing to me.
The problem seems to be wrong indexing address. It should be api.vectara.io instead of indexing.vectara.io
This indexing address is mentioned here in the github repo.
The full post url should be: f"https://api.vectara.io/v1/upload?c={CUSTOMER_ID}&o={corpus_id}"
(Notice that I have removed an extra slash as well after upload)
Also, two small things.
There is no dot between title and extension in your example code. That might be irrelevant though if extension already has a dot in it.
Make sure that you are passing the correct mimeType
Whew! We were digging in trying to find something that could have gone wrong and hadn’t uncovered anything. Thanks for letting us know and thanks for the feedback!
Also, I’d be curious if you found indexing.vectara.io somewhere recent. We made a switch from h.indexing.vectara.io (which does not have the /v1/ path part) to api.vectara.io (which does) in the docs a few weeks ago, and I want to check if we missed something in the docs or examples that currently say indexing.vectara.io instead of api.vectara.io that caused your first problem?