Skip to content

Commit 827ba53

Browse files
committed
fix: file size limit removed
1 parent 529ff1f commit 827ba53

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

app/components/EditorArea.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
@focus="$emit('set-active', pane.id)" />
2222
<Transition name="skeleton-fade">
2323
<div v-if="loadingPaneId === pane.id" class="pane-skeleton ml-10">
24-
<div v-for="i in skeletonWidths" class="skeleton-line" :style="{ width: `${i}%`}" />
24+
<div v-for="i in skeletonWidths" class="skeleton-line"
25+
:style="{ width: i / (isMobile ? 1 : 2) + '%'}" />
2526
</div>
2627
</Transition>
2728
</div>

backend/server.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ type FileEntry = {
77
type: "file" | "dir";
88
};
99

10-
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5 MB
10+
// const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5 MB
1111
const textHeaders = { "Content-Type": "text/plain; charset=utf-8" };
1212

1313
async function readFile(path: string): Promise<{ content: string; status: number }> {
1414
try {
15-
const stat = await Deno.stat(path);
16-
if (stat.size > MAX_FILE_SIZE) {
17-
return { content: `File too large (${(stat.size / 1024 / 1024).toFixed(1)} MB). Max: 5 MB.`, status: 413 };
18-
}
15+
// const stat = await Deno.stat(path);
16+
// if (stat.size > MAX_FILE_SIZE) {
17+
// return { content: `File too large (${(stat.size / 1024 / 1024).toFixed(1)} MB). Max: 5 MB.`, status: 413 };
18+
// }
1919
return { content: await Deno.readTextFile(path), status: 200 };
2020
} catch (e) {
2121
console.error(`Error reading ${path}:`, e);

0 commit comments

Comments
 (0)