Skip to content

Commit 428b6db

Browse files
committed
refactor(files): return readSourceBuffer's TSDoc to its function
1 parent 2913b56 commit 428b6db

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎apps/sim/lib/workspace-files/application/read-workspace-file-text.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@ export interface ReadWorkspaceFileTextResult extends ExtractedFileText {
7575
file: WorkspaceFileRecord
7676
}
7777

78-
/**
79-
* Reads an ordinary uploaded file's bytes.
80-
*
81-
* The stored size is authoritative for these, so an oversized file is refused
82-
* before any bytes are fetched. It is NOT authoritative for a generation source,
83-
* which is why that path is bounded by the artifact ceiling instead.
84-
*/
8578
/** Refuses a text read of a file whose format has no extractor. */
8679
export function textExtractionUnsupportedError(name: string): OrchestrationError {
8780
return new OrchestrationError(
@@ -111,6 +104,13 @@ export function renderedTextTooLargeMessage(name: string, limit: string): string
111104
return `"${name}" renders to more than ${limit}, above the text-extraction limit; download the raw bytes instead of extracting text`
112105
}
113106

107+
/**
108+
* Reads an ordinary uploaded file's bytes.
109+
*
110+
* The stored size is authoritative for these, so an oversized file is refused
111+
* before any bytes are fetched. It is NOT authoritative for a generation source,
112+
* which is why that path is bounded by the artifact ceiling instead.
113+
*/
114114
async function readSourceBuffer(
115115
file: WorkspaceFileRecord,
116116
maxBytes: number,

0 commit comments

Comments
 (0)