Skip to content

Conversation

@farnabaz
Copy link
Collaborator

Cloudflare multi-part upload does not return httpMetadata and customMetadata when the upload is complete. As we depend on customMetadata to find contentType of the file, this behavior leads to undefined contentType.

There are two solutions so far:

  1. call hubBlob().head(mpu.key) in upload complete and re-fetch the information on file (adds one extra read operation on all uploads)
  2. re-evaluate contentType using our getContentType if it's missing. This PR proposes this solution.

@farnabaz farnabaz requested a review from atinux March 25, 2025 11:25
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 25, 2025

Open in Stackblitz

npm i https://pkg.pr.new/nuxt-hub/core/@nuxthub/core@517

commit: 470a0ba

@atinux atinux merged commit 6055688 into main Mar 25, 2025
9 checks passed
@atinux atinux deleted the fix/content-type branch March 25, 2025 13:03
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