MCPcopy
hub / github.com/simstudioai/sim / extractStorageKeyFromPath

Function extractStorageKeyFromPath

apps/sim/app/api/files/delete/route.ts:119–125  ·  view source on GitHub ↗

* Extract storage key from file path

(filePath: string)

Source from the content-addressed store, hash-verified

117 * Extract storage key from file path
118 */
119function extractStorageKeyFromPath(filePath: string): string {
120 if (filePath.startsWith('/api/files/serve/')) {
121 return extractStorageKey(filePath)
122 }
123
124 return extractFilename(filePath)
125}

Callers 1

route.tsFile · 0.85

Calls 2

extractStorageKeyFunction · 0.90
extractFilenameFunction · 0.90

Tested by

no test coverage detected