cloudflare / cloudflare/developer-platform

🐛 BUG: R2 Multipart upload doesn't return custom metadata

Đang mở
#3 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
product:r2
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Which Cloudflare product(s) does this pertain to?

R2

### What version(s) of the tool(s) are you using?

3.57.2 Wrangler

### What version of Node are you using?

20.12.2

### What operating system and version are you using?

Windows 11

### Describe the Bug

### Observed behavior
Custom metadata is missing when completing a R2 multipart upload. However when fetching the head of the r2Object the metadata is there. Strangely enough when running locally with `wrangler pages dev` the example works as expected. Only once you deploy your site the custom metadata is missing.

```js
const upload = await env.BUCKET.createMultipartUpload(key, {
customMetadata: {
hallo: 'zwallo',
},
});

const uploadPart = await upload.uploadPart(1, request.body);

const r2Object = await upload.complete([uploadPart]);
console.log(r2Object.customMetadata) // logs an empty object: {}

const r2Head = await env.BUCKET.head(key);
console.log(r2Head.customMetadata) // logs the correct metadata: {hallo: "zwallo"}
```

### Expected behavior
`multipartUpload.complete()` should return an `R2Object` with the field `customMetadata` populated

### Steps to reproduce
1. clone repository
2. run `cd multipart-upload-missing-metadata && npm i`
3. run `npm run dev` for a working example
4. run `npm run deploy` for the example to fail on the deployed site

### Please provide a link to a minimal reproduction

https://github.com/YannicEl/cloudflare_worker_bugs/tree/main/multipart-upload-missing-metadata

### Please provide any relevant error logs

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu từ bản tái hiện multipart-upload-missing-metadata và cài đặt các dependency của nó bằng npm i. Chạy npm run dev và npm run deploy, sau đó so sánh customMetadata được multipartUpload.complete() trả về với metadata từ head(); hoàn tất khi example đã triển khai trả về metadata đã được điền.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, node.js
Lĩnh vực
api, backend, cloud
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
32/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.