MCPcopy Index your code
hub / github.com/simstudioai/sim / shouldReadSandboxPathAsBase64

Function shouldReadSandboxPathAsBase64

apps/sim/lib/execution/e2b.ts:143–160  ·  view source on GitHub ↗
(outputSandboxPath: string)

Source from the content-addressed store, hash-verified

141}
142
143function shouldReadSandboxPathAsBase64(outputSandboxPath: string): boolean {
144 const ext = outputSandboxPath.slice(outputSandboxPath.lastIndexOf('.')).toLowerCase()
145 const binaryExts = new Set([
146 '.png',
147 '.jpg',
148 '.jpeg',
149 '.gif',
150 '.webp',
151 '.pdf',
152 '.zip',
153 '.mp3',
154 '.mp4',
155 '.docx',
156 '.pptx',
157 '.xlsx',
158 ])
159 return binaryExts.has(ext)
160}
161
162async function readSandboxOutputFile(
163 sandbox: E2BSandbox,

Callers 1

readSandboxOutputFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected