Closed rickkas7 closed 6 years ago
I don't seem to be able to use the Cloud API for uploading a product firmware binary as described here. I get an unexpected field error.
If I pass what I believe to be a valid request, I get an unexpected field error:
$ curl -X POST "https://api.particle.io/v1/products/1319/firmware?access_token=1234" -F file=@13subscribetest.bin -F version=25 -F title="cloud upload test" {"ok":false,"error":"Unexpected field"}
If I leave the "file" field out, then I get an error that it must be specified:
$ curl -X POST "https://api.particle.io/v1/products/1319/firware?access_token=1234" -F version=25 -F title="cloud upload test" {"ok":false,"code":400,"error":"You must specify a file"}
Nice find! I had to dig through the API code to figure out that the correct parameter name is binary not file. I'll update the docs.
binary
file
Bugs
Expected behavior
I don't seem to be able to use the Cloud API for uploading a product firmware binary as described here. I get an unexpected field error.
Observed behavior
If I pass what I believe to be a valid request, I get an unexpected field error:
Steps to reproduce
If I leave the "file" field out, then I get an error that it must be specified: