Skip to content

Commit f56d775

Browse files
committed
chore(files): remove extraneous comments from export route
1 parent c4f28d4 commit f56d775

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

  • apps/sim/app/api/files/export/[id]

apps/sim/app/api/files/export/[id]/route.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ function isMarkdown(originalName: string, contentType: string): boolean {
2828
return MARKDOWN_EXTENSIONS.has(ext)
2929
}
3030

31-
/** Strip characters that would break Content-Disposition header or zip entry paths. */
3231
function safeFilename(name: string): string {
3332
return path
3433
.basename(name)
3534
.replace(/["\\]/g, '_')
3635
.replace(/[\r\n\t]/g, '')
3736
}
3837

39-
/** Deduplicate asset filename by appending the first 8 chars of its UUID when a collision exists. */
4038
function deduplicatedFilename(preferred: string, existing: Set<string>, imageId: string): string {
4139
if (!existing.has(preferred)) return preferred
4240
const ext = path.extname(preferred)
@@ -87,8 +85,6 @@ export const GET = withRouteHandler(
8785

8886
logger.info('Exporting markdown with embedded images', { id, imageCount: imageIds.length })
8987

90-
// Fetch all images in parallel, then deduplicate filenames serially to avoid
91-
// a race where two concurrent callbacks both pass the "not yet seen" check.
9288
const fetchResults = await Promise.allSettled(
9389
imageIds.map(async (imageId) => {
9490
const imgRecord = await getFileMetadataById(imageId)

0 commit comments

Comments
 (0)