diff --git a/packages/dashboard/src/api.js b/packages/dashboard/src/api.js index b16b4e5..92228f9 100644 --- a/packages/dashboard/src/api.js +++ b/packages/dashboard/src/api.js @@ -77,7 +77,6 @@ const apiHandler = { }); }, multipartComplete: (file, folder, parts, uploadId) => { - const key = apiHandler.getKey(folder, file.name); return axios.post(`/api/buckets/${store.state.activeBucket}/multipart/complete`, { key: encodeKey(file.name, folder), uploadId, diff --git a/worker/package-lock.json b/worker/package-lock.json index a9053df..456e086 100644 --- a/worker/package-lock.json +++ b/worker/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "@cloudflare/itty-router-openapi": "https://prerelease-registry.devprod.cloudflare.dev/itty-router-openapi/runs/5881739194/npm-package-itty-router-openapi-83", + "@cloudflare/itty-router-openapi": "^1.0.1", "postal-mime": "^1.0.16" }, "bin": { @@ -58,13 +58,12 @@ } }, "node_modules/@cloudflare/itty-router-openapi": { - "version": "0.0.0-9fa1648", - "resolved": "https://prerelease-registry.devprod.cloudflare.dev/itty-router-openapi/runs/5881739194/npm-package-itty-router-openapi-83", - "integrity": "sha512-kAHvm7m8kYQZnp5hNldW90bVx33XfRMNNhoywmrOyR9YRgaiVs3OiszZUEWeLTiJX6egZniHChXIf31O21hu5g==", - "license": "MIT", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@cloudflare/itty-router-openapi/-/itty-router-openapi-1.0.1.tgz", + "integrity": "sha512-6qGUraCHdx/8/S2LZ4wziidd8POWEqID5yPVmxnN5NlSIvw6bqXjgh2LF+Ev21YKkHnoA6w01zEVvgTUg7qJsA==", "dependencies": { "@asteasolutions/zod-to-openapi": "^5.3.1", - "itty-router": "^4.0.14", + "itty-router": "^4.0.22", "openapi3-ts": "^4.1.2", "zod": "^3.21.4" } @@ -2404,9 +2403,9 @@ "dev": true }, "node_modules/itty-router": { - "version": "4.0.20", - "resolved": "https://registry.npmjs.org/itty-router/-/itty-router-4.0.20.tgz", - "integrity": "sha512-dGbWSMkX5CgBV+VRu2xZEcQPkfu2KYyULPzmmmOTVJ6swvnfNsF1UikRrewzuo/nNwb5MHr9afjsdsmQktqp2g==" + "version": "4.0.22", + "resolved": "https://registry.npmjs.org/itty-router/-/itty-router-4.0.22.tgz", + "integrity": "sha512-FWK13vcITqld32NaOh+k2unRrR4qBZdzA9O1ctpqT1Q4lxKrHbtgaX1lLTv2VyXj3/8Waqk/NlDGNfxypJ8GKA==" }, "node_modules/js-yaml": { "version": "4.1.0", diff --git a/worker/package.json b/worker/package.json index 309744c..60b2526 100644 --- a/worker/package.json +++ b/worker/package.json @@ -95,7 +95,7 @@ "wrangler": "^3.6.0" }, "dependencies": { - "@cloudflare/itty-router-openapi": "https://prerelease-registry.devprod.cloudflare.dev/itty-router-openapi/runs/5881739194/npm-package-itty-router-openapi-83", + "@cloudflare/itty-router-openapi": "^1.0.1", "postal-mime": "^1.0.16" }, "bin": { diff --git a/worker/src/buckets/api/multipart/createUpload.ts b/worker/src/buckets/api/multipart/createUpload.ts index 8be9476..e6ee569 100644 --- a/worker/src/buckets/api/multipart/createUpload.ts +++ b/worker/src/buckets/api/multipart/createUpload.ts @@ -38,11 +38,6 @@ export class CreateUpload extends OpenAPIRoute { httpMetadata = JSON.parse(decodeURIComponent(escape(atob(data.query.httpMetadata)))) } - const multipartUpload = await bucket.createMultipartUpload(key, {customMetadata: customMetadata, httpMetadata: httpMetadata}); - - return { - uploadId: multipartUpload.uploadId, - key: multipartUpload.key, - } + return await bucket.createMultipartUpload(key, {customMetadata: customMetadata, httpMetadata: httpMetadata}); } }