How do I remove that? Updating the vehicle with a request like
{
“image”:
{
"id": ""
}
}
didn’t work …
Btw, if I’m at it, how do I delete images not related to a vehicle anymore? When testing it happened that I overwrote the image id of a vehicle with a new one but didn’t delete the old file first. That may clutter the server space, but also it prevents me from uploading the same image again (at least with the same name).
Please try "id": null Instead of "id": ""
It is an object
If you still have the vehicle: you can use the endpoint /directories and get the directory to the vehicle with all its entries. From there you have to identify your picture and get the id. Then you can delete the file in the endpoint /files
Hm, about the directories: how do I get the directories of a vehicle? A directory has no reference to a vehicle so I don’t know how to search with the endpoint /directories/search, and a vehicle only has an attribute for assetDirectory. When I upload a file to a vehicle via Calponia it seems to be placed in a /home directory, but how do I get the id of that directory if there is no file yet? To upload a file in my own app I have to know that directory id …