Skip to content

Commit 701abc6

Browse files
committed
chore(input-format): tighten parseInputFormatFiles comment
1 parent 47952a7 commit 701abc6

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

apps/sim/lib/workflows/input-format.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,10 @@ export function parseInputFormatFiles(value: unknown): InputFormatFile[] {
101101
return raw.filter((file): file is InputFormatFile => {
102102
if (file === null || typeof file !== 'object') return false
103103
const f = file as InputFormatFile
104-
// Require the full run-ready shape the executor's normalizeStartFile needs,
105-
// with a recoverable key: either an explicit non-empty `key`, or an internal
106-
// `/api/files/serve/...` URL the executor can recover the key from (same rule
107-
// as normalizeStartFile). A partial object or external/signed URL without a
108-
// key is rejected so it never opens in uploader mode or reaches the files
109-
// channel only to be dropped; it falls back to the JSON editor instead.
110-
// Non-empty strings: normalizeStartFile rejects falsy id/name/url/type, and
111-
// file normalization is all-or-nothing, so one empty-string field would drop
112-
// every file from the run.
104+
// Accept only the run-ready shape `normalizeStartFile` accepts (non-empty
105+
// id/name/url/type + finite size + recoverable key); file normalization is
106+
// all-or-nothing, so anything short of this falls back to the JSON editor
107+
// rather than silently dropping every file at run time.
113108
return (
114109
typeof f.id === 'string' &&
115110
f.id.length > 0 &&

0 commit comments

Comments
 (0)