When I upload a file I have to specify a directory id. Where do I get that from? 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?
The home-directory of a project can be found at the project itself:
The right location/directory highly depends on your usecase:
- might should be selected by the user
- might should be a directory for you application, which you create in the project home
- might should be aligned to existing files
Atm my application should place uploaded files at the same location as if the file was uploaded via the Calponia UI. Is that then always the project home directory?
The user has the option to upload the file to what ever directory he/she wants in the file-browser. If the upload of the file is directly on the vehicle/equipment page its uploaded to the project-root directory and can be moved by the user in the file-browser.