feat(spx-gui): raise sb upload limit to 128 MiB#3352
Conversation
Raise the hardcoded local pre-check for Scratch (.sb2/.sb3) project conversion from 64 MiB to 128 MiB so larger projects can be uploaded. The general upload path in cloud.ts already follows the backend-provided maxSize, so no change is needed there. Update the openapi.yaml project-conversions description to match. Fixes #3351 Generated with [FennoAI](https://github.com/apps/fennoai) Co-authored-by: go-wyvern <15845637+go-wyvern@users.noreply.github.com>
There was a problem hiding this comment.
Review summary
Small, focused change that raises the frontend sb (.sb2/.sb3) upload pre-check limit from 64 MiB to 128 MiB and updates the matching OpenAPI description. The change is correct and internally consistent:
project-conversion.tsis the only hardcoded frontend limit (confirmed via repo-wide search for64 * 1024 * 1024/67108864/64 MiB— no other references remain).- The general cloud upload path in
models/common/cloud.tsalready follows the backend-providedmaxSize, so it needs no change here.
One minor, non-blocking nit inline. As the PR description notes, the companion backend change (maxMultipartMemory 64 → 128 MiB) is required for this to fully take effect; this frontend-only pre-check will otherwise reject at 128 MiB while the backend still rejects earlier — worth landing them together.
No blocking issues found.
| import { humanizeFileSize } from '@/utils/utils' | ||
|
|
||
| const maxFileSize = 64 * 1024 * 1024 // 64MB | ||
| const maxFileSize = 128 * 1024 * 1024 // 128MB |
There was a problem hiding this comment.
Nit (pre-existing, non-blocking): the value is binary (128 * 1024 * 1024 = 128 MiB), but the comment says // 128MB and the user-facing error uses humanizeFileSize, which labels base-1024 units as MB (not MiB). So the doc/PR say "128 MiB" while the UI will show "128 MB" for the same value. Consider aligning the terminology (e.g. // 128 MiB) for consistency with docs/openapi.yaml.
Summary
Raise the sb (
.sb2/.sb3) upload limit from 64 MiB to 128 MiB on the frontend, tracking #3351.Changes
spx-gui/src/apis/project-conversion.ts: change the hardcoded local pre-checkmaxFileSizefrom64 * 1024 * 1024to128 * 1024 * 1024. This was the only hardcoded 64 MiB frontend limit.docs/openapi.yaml: update the/project-conversionsrequest body description from "Maximum size is 64 MiB." to "Maximum size is 128 MiB.".Notes
spx-gui/src/models/common/cloud.ts) already follows the backend-providedmaxSizeand needs no change — it will pick up 128 MiB once the backend raises the value.UpInfo.maxSizeexample indocs/openapi.yaml(26214400) is a generic illustrative value unrelated to the sb limit, so it is left unchanged.goplus/builder-backend(maxMultipartMemory64 → 128 MiB) to fully take effect.Fixes #3351
Generated with FennoAI