Mission uploader
Use StServerUploader to create missions and upload multiple content files from a CSV or JSON configuration.

OS
- Windows (64 bit)
- Linux (64 bit)
StServerUploader usage
Windows
stserveruploader.exe -i ./data/missionList.csv -s http://yourServerUrl -u userName -p password
Linux
./stserveruploader.run -i ./data/missionList.csv -s http://yourServerUrl -u userName -p password
Arguments
| Flag | Name | Description |
|---|---|---|
| -i | --input | Input configuration file path |
| -s | --server | Server URL |
| -u | --user | User name |
| -p | --password | Password |
| --printUsage | Print argument descriptions (true/false) |
A configuration file (.csv or .json) provides a list of missions to create and the location of the content to upload. The upload utility first checks for the specified files on your local machine and uploads them if found. If not, it treats the file path as a local path on the server and tries to locate the files there. This method can be used instead of uploading files over HTTP. For example, you can upload the files using FTP and reference them in the .csv or .json.
Note
If the server runs in Docker, you must map your upload directory so that the server can find it while running in the container.
Configuring upload directories with Docker
If files are stored in ${HOME}/Movies on the host, mount that directory into the server container.\
Set the HOST_UPLOAD environment variable (in the .env file) to that location and STANAG On Demand Server will map it as a volume.
HOST_UPLOAD=${HOME}/Movies/
The default upload directory inside the container is /app/upload/.\
Use paths visible inside the container, including any subdirectories, in your CSV or JSON configuration.
Mission._id,Mission.name,Mission.description,Mission.tags,Mission.usergroups,Mission.platform.name,Mission.platform.type,Mission.securityClassification,Mission.sensors.0.name,Mission.sensors.0.description,Mission.sensors.0.type,Mission.sensors.0.tags,Mission.sensors.0.sampling,Mission.sensors.0.files
,TestMission,Test Mission,"flight,test","Demo, Group1",Heron,Plane,UNCLASSIFIED,EO/IR,Main EO/IR,video,camera,200, ./uploadme/test.ts
Data format
StServerUploader supports 2 text formats:
- csv
- json
CSV configuration file format
CSV configuration represents the mission hierarchy using dot-separated field names. Each mission can contain several sensors; the first line defines the fields.\ For example:
Mission._id,Mission.name,Mission.description,Mission.tags,Mission.usergroups,Mission.platform.name,Mission.platform.type,Mission.securityClassification,Mission.sensors.0.name,Mission.sensors.0.description,Mission.sensors.0.type,Mission.sensors.0.tags,Mission.sensors.0.sampling,Mission.sensors.0.files
,TestMission,Test Mission,"flight,test","Demo, Group1",Heron,Plane,UNCLASSIFIED,EO/IR,Main EO/IR,video,camera,200,D:/Movie/ArcGIS/Truck.ts
,TestMission2,Test Mission2,"flight,test","Demo, Group1",Heron,Plane,UNCLASSIFIED,EO/IR,Main EO/IR,video,camera,200,D:\Movie\DeadSea-1-1080p-6M-A.ts
JSON configuration file format
JSON configuration contains an array of missions. Each mission can contain an array of sensors.\ For example:
[
{
"name": "Mission-1",
"description": "Test Mission 1",
"tags": "flight,test",
"usergroups": "Demo, Group1",
"platform": {
"name": "Heron",
"type": "Plane"
},
"securityClassification": "UNCLASSIFIED",
"sensors": [
{
"name": "EO/IR",
"description": "Main EO/IR",
"type": "video",
"tags": "camera",
"sampling": "200",
"files": "/home/user/Movies/video1.ts"
}
]
},
{
"name": "Mission-2",
"description": "Test Mission 2",
"tags": "flight,test",
"usergroups": "Demo, Group1",
"platform": {
"name": "Heron",
"type": "Plane"
},
"securityClassification": "UNCLASSIFIED",
"sensors": [
{
"name": "EO/IR",
"description": "Main EO/IR",
"type": "video",
"tags": "camera",
"sampling": "200",
"files": "/home/user/Movies/video2.ts"
}
]
}
]
Your mission can have bookmarks and other information:
[
{
"name": "2T",
"description": "Test",
"thumbnail": "Video-sm.jpg",
"state": "Ready",
"creationTime": "2021-10-10T09:22:55.186Z",
"startTime": "2012-09-19T20:50:26.484Z",
"endTime": "2012-09-19T20:52:54.296Z",
"usergroups": [
"Demo"
],
"platform": {
"name": "Platform",
"type": "Plane",
"presentation": {
"icon": "glyphicon-picture",
"color": "#004dcf",
"weight": 2
}
},
"country_name": "Israel",
"country_code": "IL",
"sensors": [
{
"name": "EO-IR",
"description": "Sensor",
"type": "video",
"views": 6,
"tags": [],
"hlsProps": {
"segmentDuration": 10,
"width": 1920,
"height": 1080
},
"endTime": "2012-09-19T20:52:54.296Z",
"startTime": "2012-09-19T20:50:26.484Z",
"assets": [
"/home/myuser/Movies/video1.ts"
]
}
],
"bookmarks": [
{
"title": "BM1",
"text": "BM1Text",
"tags": [],
"author": "alexc",
"editor": "alexc",
"startTime": "2012-09-19T20:50:58.925Z",
"position": 11.72,
"color": "blue"
},
{
"missionName": "2T",
"sensorName": "EO-IR",
"title": "BM2",
"text": "BM2",
"tags": [],
"author": "alexc",
"editor": "alexc",
"startTime": "2012-09-19T20:51:35.865Z",
"position": 42.4,
"color": "blue"
}
],
"rating": 2,
"tags": [
"Test"
],
"sortOrder": 2000
}
]
Platform options:
Platform type can be one of the following:
- Plane
- Helicopter
- Quadcopter
- Camera
- ROV
- Diver
default: Plane