create-100x-mobile 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -625,9 +625,17 @@ async function handleUpload(
625
625
  const objectKey = ["uploads", user.id, uploadId].join("/");
626
626
  let object: R2Object;
627
627
  try {
628
+ const body = await request.arrayBuffer();
629
+ if (body.byteLength > policy.maxUploadBytes) {
630
+ throw createStorageApiError(
631
+ 413,
632
+ "Upload exceeds the configured size limit.",
633
+ { size: body.byteLength, maxUploadBytes: policy.maxUploadBytes },
634
+ );
635
+ }
628
636
  object = await env.STORAGE.put(
629
637
  objectKey,
630
- createLimitedBodyStream(getRequestBody(request), policy.maxUploadBytes),
638
+ body,
631
639
  {
632
640
  httpMetadata: {
633
641
  contentType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-100x-mobile",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "Scaffold a full-stack mobile app with Expo + Convex + Clerk in seconds",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {