Skip to content

fix: use supported upload size limit - #21

Merged
canghai118 merged 1 commit into
linkcraftstudio:mainfrom
MrVortexLabs:fix/upload-size-limit
Aug 24, 2026
Merged

fix: use supported upload size limit#21
canghai118 merged 1 commit into
linkcraftstudio:mainfrom
MrVortexLabs:fix/upload-size-limit

Conversation

@MrVortexLabs

@MrVortexLabs MrVortexLabs commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Updates the image upload size limit from the unsupported 10MB literal to the NuxtHub-supported 16MB value, and keeps the widget client-side validation message in sync with the server limit.

Why

server/api/upload.post.ts used ensure.maxSize: '10MB', but the typed NuxtHub upload validator only accepts specific binary size literals such as 8MB and 16MB. This caused TypeScript to report an invalid upload size literal.

How to review

Start with server/api/upload.post.ts, then check app/components/WidgetEmbed/WidgetEmbedChat.vue to confirm the browser-side limit matches the server-side upload limit.

Checklist

  • Commits are signed off (git commit -s)
  • Tests pass locally (pnpm build)
  • If schema changed, migration was generated (pnpm generate:migration) and committed
  • If public API or env vars changed, README.md / .env.example / docs/deploy/* updated
  • No secrets, internal URLs, or team member names in the diff

Local verification:

  • pnpm i18n:check passes
  • Upload type error for server/api/upload.post.ts is gone

Note: full typecheck still has unrelated existing errors outside this small diff.

Signed-off-by: MrVortexLabs <00mrvortexlabsuzb00@gmail.com>
@canghai118

Copy link
Copy Markdown
Contributor

Thanks for the fix! You're right

@canghai118
canghai118 merged commit a7a2f24 into linkcraftstudio:main Aug 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants