Skip to content

Commit

Permalink
upload: also send fieldmap
Browse files Browse the repository at this point in the history
  • Loading branch information
vmagro committed Jan 25, 2025
1 parent 38d8cb5 commit f6d885d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ enum ResourceId {
Pipeline(usize),
DetectorModel(usize),
DetectorLabels(usize),
FieldMap(usize),
}

impl ResourceId {
Expand All @@ -26,6 +27,7 @@ impl ResourceId {
Self::Pipeline(idx) => Path::new("pipelines").join(format!("{idx}.toml")),
Self::DetectorModel(idx) => Path::new("detectors").join(format!("{idx}.model.tflite")),
Self::DetectorLabels(idx) => Path::new("detectors").join(format!("{idx}.labels.txt")),
Self::FieldMap(idx) => Path::new("field").join(format!("{idx}.fmap")),
}
}

Expand All @@ -48,6 +50,11 @@ impl ResourceId {
url.query_pairs_mut().append_pair("index", &idx.to_string());
url
}
Self::FieldMap(idx) => {
let mut url = limelight.join("/upload-fieldmap").expect("this is valid");
url.query_pairs_mut().append_pair("index", &idx.to_string());
url
}
}
}
}
Expand All @@ -66,6 +73,7 @@ impl Upload {
ResourceId::Pipeline(idx),
ResourceId::DetectorModel(idx),
ResourceId::DetectorLabels(idx),
ResourceId::FieldMap(idx),
]
}) {
let path = id.disk_relpath();
Expand Down

0 comments on commit f6d885d

Please sign in to comment.