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

Function parseHttpFile

apps/sim/lib/knowledge/documents/document-processor.ts:841–852  ·  view source on GitHub ↗
(
  fileUrl: string,
  filename: string,
  mimeType?: string,
  userId?: string
)

Source from the content-addressed store, hash-verified

839}
840
841async function parseHttpFile(
842 fileUrl: string,
843 filename: string,
844 mimeType?: string,
845 userId?: string
846): Promise<{ content: string; metadata?: FileParseMetadata }> {
847 const buffer = await downloadFileWithTimeout(fileUrl, userId)
848
849 const extension = resolveParserExtension(filename, mimeType)
850 const result = await parseBuffer(buffer, extension)
851 return result
852}

Callers 1

parseWithFileParserFunction · 0.85

Calls 3

resolveParserExtensionFunction · 0.90
parseBufferFunction · 0.90
downloadFileWithTimeoutFunction · 0.85

Tested by

no test coverage detected