CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/lib/share/share-url.ts
Views: 687
1
import { encodePath } from "./raw-url";
2
import { join } from "path";
3
4
export default function shareURL(
5
id: string,
6
relativePath: string = ""
7
): string {
8
// do NOT need base path since this is a link from the next server into itself.
9
return join("/share", "public_paths", id, encodePath(relativePath));
10
}
11
12