Files
openmotion/shared/project-source-url.ts
open-design-crew[bot] 63dd85909e fix: keep hosted project file reads current (#1052)
Co-authored-by: lefarcen <935902669@qq.com>
2026-11-25 11:37:38 +08:00

7 lines
368 B
TypeScript

/** A mutable file read is an API resource even when the authored path ends in a media extension. */
export const PROJECT_SOURCE_ROUTE = '/api/projects/:id/file-source';
export function projectSourceReadUrl(projectId: string, path: string): string {
return PROJECT_SOURCE_ROUTE.replace(':id', encodeURIComponent(projectId)) + '?path=' + encodeURIComponent(path);
}