File upload API

I tried to upload pdf file using FileUpload API with ApiKeyAuth, correct key, customer ID and corpus ID, and I am getting "Error 400 - An invalid request was sent. e.g. one or more parameters was missing, or the corpus does not exist" as response. The error detail says “‘file’ part not found” although I have uploaded the file named “divorce.pdf” and it is under 10MB.

What could be going wrong here?

Hi @June_76,

We are looking into it to see if it’s an issue with the plugin or something else.

In the meantime, you can run it manually. I copied the curl command and then I had to enter the file path manually:

Example:

curl -L -X POST 'https://api.vectara.io/v1/upload?c=7890&o=1' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'x-api-key: 12345' \
-F 'file=@"/Users/pwoz/tmp/doc.txt"'

Yes, I tried the curl command and it worked. Thanks for the help!