Upload File api is giving 400 Error
# support
x
Request: curl -X POST https://api.vapi.ai/file \ -H "Authorization: Bearer XXXXXXXXXXXXXXXXXX" \ -H "Content-Type: multipart/form-data" \ -F file=@"SampleFile.pdf;type=application/pdf" Response" { "message": "Multipart: Unexpected end of form", "error": "Bad Request", "statusCode": 400 } Some issue when running this api from Fern.
v
@xerocool1 It seems like there might be an issue with the way the file is being attached to the form in the
curl
command. The error message "Multipart: Unexpected end of form" suggests that the server is expecting more data or that the form data is not being closed properly. Here are a few things you can check: 1. Ensure that the file path is correct and that
SampleFile.pdf
exists at the specified location. 2. Verify that the
curl
command is being executed in an environment where the file is accessible. 3. Make sure that the
curl
command is formatted correctly, especially the
-F
part for the file upload. If you're running this command in an environment like Fern, make sure that it supports file uploads and that any necessary permissions are granted. If you continue to experience issues, please provide more details or ask support for more info on this.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
x
Well... this problem occures even if i run it from your developer portal. so i dont believe it is file path access problem. and Curl is from your developer portal with "-F" so, that is not the problem either.
v
Got it. Tagging @User for additional help.
x
This issue is still open. there is a problem with the api or the documentation
how do i get around this problem
4 Views