forked from longtao.wu/droboticflow
15 lines
415 B
JavaScript
15 lines
415 B
JavaScript
export function inferSourceDataSource(sourcePath, override = "") {
|
|
const explicit = String(override || "").trim().toUpperCase();
|
|
if (explicit === "FILESYSTEM") {
|
|
return "LOCAL";
|
|
}
|
|
if (explicit) {
|
|
return explicit;
|
|
}
|
|
const normalizedPath = String(sourcePath || "").trim().toLowerCase();
|
|
if (!normalizedPath) {
|
|
return "";
|
|
}
|
|
return normalizedPath.startsWith("bos://") ? "BOS" : "LOCAL";
|
|
}
|