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

Function resolveHttpsUrlFromFileInput

apps/sim/lib/uploads/utils/file-utils.ts:659–677  ·  view source on GitHub ↗
(fileInput: unknown)

Source from the content-addressed store, hash-verified

657 * Returns null if no valid HTTPS URL is found
658 */
659export function resolveHttpsUrlFromFileInput(fileInput: unknown): string | null {
660 if (!fileInput || typeof fileInput !== 'object') {
661 return null
662 }
663
664 const record = fileInput as Record<string, unknown>
665 const url =
666 typeof record.url === 'string'
667 ? record.url.trim()
668 : typeof record.path === 'string'
669 ? record.path.trim()
670 : ''
671
672 if (!url || !url.startsWith('https://')) {
673 return null
674 }
675
676 return url
677}
678
679function resolveStorageKeyFromRawFile(file: RawFileInput): string | null {
680 if (file.key) {

Callers 2

fireflies.tsFile · 0.90
google_slides.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected