Upload file though api

Hi there,

I am trying to upload file through fibery api with postman but it always retruning message not files were uploaded.

curl -X POST https://YOUR_ACCOUNT.fibery.io/api/files \
     -H 'Authorization: Token YOUR_TOKEN' \
     -H 'content-type: multipart/form-data' \
     -F 'file=@C:\Users\Trillian\Pictures\virat-kohli.jpg'

I have import this curl directly into postman and changed the account and token then choose the file from file input at postman and hit send and getting message

400 bad request
{
“message”: “No files were uploaded.”
}

i am sending request as post with form-data, please let me know what is the issue

Thanks

Could not reproduce the issue, everything works fine to me.
Please make sure that there is ‘@’ sign in -F ‘file=@…’ it is crucial for curl.

1 Like