Hey Rick, thanks for the reply. Do you have an example? I was initially trying to do this from the provided POSTman collection. Ideally I want to do implement this on my HTML form which I send to MAKE, but currently not even my test curls are working when I try to match the Cloud API docs (two examples below with some device / key redacting).. also I should note that even though the docs say the build_target_version isn't required and it defaults to the latest, it actually gives me a long error if I don't specify it as 5.5.0 .
The flash a device with source code API example for instance. This is what I did once I was in the FileAssetExample directory:
curl -X PUT "https://api.particle.io/v1/devices/XXXXXXXXX?access_token=YYYYYYY" \
-F build_target_version=5.5.0 \
-F "file=@project.properties;filename=project.properties" \
-F "file1=@src/FileAssetExample.cpp;filename=src/FileAssetExample.cpp" \
-F "file2=@assets/logo.png;filename=assets/logo.png"
It results in this message back:
{"ok":true,"message":"Update started"}
And the code starts running, but it doesn't appear to have sent any assets over in the process.
I get a similar result when I try to use curl to compile source code:
curl -X POST "https://api.particle.io/v1/binaries?access_token=XXXXXXXXXXX" \
-F platform_id=32 \
-F build_target_version=5.5.0 \
-F "file=@project.properties;filename=project.properties" \
-F "file1=@src/FileAssetExample.cpp;filename=src/FileAssetExample.cpp" \
-F "file2=@assets/logo.png;filename=assets/logo.png"
Result:
{"ok":true,"binary_id":"XXXXXXX","binary_url":"/v1/binaries/XXXXXXX","build_target_version":"5.5.0","expires_at":"2023-09-23T17:53:12.128Z","sizeInfo":" text\t data\t bss\t dec\t hex\tfilename\n 17518\t 124\t 3254\t 20896\t 51a0\t/workspace/target/workspace.elf\n"}
When I download it to check it out, it's always just a 20kb .bin file.
This is my unmodified project.properties:
name=FileAssetExample
assetOtaDir=assets
Can you spot what I'm doing incorrectly?