Azure Blobs: `ListObjects` returns paths with `blobPrefix` when a container is configured
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 65/100
Hướng nghiên cứu
Bắt đầu với phần chuyển đổi danh sách trong FluentStorage.Azure.Blobs/Storage/AzureBlobStore.cs, khoảng dòng 532–578, rồi so sánh với cách xây dựng đường dẫn đọc khoảng dòng 628–656. Theo dõi cách container cố định và blobPrefix được áp dụng vào tên blob được tái tạo; hoàn tất khi ListObjects trả về FullPath mà OpenRead có thể sử dụng mà không nhân đôi tiền tố.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
With FluentStorage.Azure.Blobs 8.0.24 and AzureBlobStorage.FromClient(client, containerName, blobPrefix), ListObjects queries the correct Azure prefix but returns StoreObject.FullPath with the prefix still attached. Passing that path to OpenRead applies the prefix a second time.
Reproduction
Given a container named documentos containing clientes/acme/relatorio.pdf:
var store = AzureBlobStorage.FromClient(client, "documentos", "clientes/acme");
var items = await store.ListObjects(new StorageListOptions
{
FolderPath = "/",
Recurse = true,
IncludeAttributes = true
});
var file = items.Single(item => item.IsFile);
Console.WriteLine(file.FullPath);
await using var stream = await store.OpenRead(file.FullPath);
Expected: FullPath is relatorio.pdf. OpenRead addresses /documentos/clientes/acme/relatorio.pdf.
Observed: The list request has the correct prefix, but the returned path causes a duplicate prefix on read.
GET /documentos?restype=container&comp=list&prefix=clientes%2Facme%2F&include=Metadata
FullPath: clientes/acme/relatorio.pdf
HEAD /documentos/clientes/acme/clientes/acme/relatorio.pdf
Root cause
With a fixed container, AzureContainerBrowser returns blob names relative to that container. AzureBlobStore.ToStorePath tries to strip documentos/clientes/acme/ from clientes/acme/relatorio.pdf, so the name passes through unchanged. GetPartsAsync then adds clientes/acme when opening the file. [Listing conversion](https://github.com/robinrodricks/FluentStorage/blob/b91624123ca59b1c1b5ebdecd5364b2e28d86104/FluentStorage.Azure.Blobs/Storage/AzureBlobStore.cs#L532-L578) · [Read path construction](https://github.com/robinrodricks/FluentStorage/blob/b91624123ca59b1c1b5ebdecd5364b2e28d86104/FluentStorage.Azure.Blobs/Storage/AzureBlobStore.cs#L628-L656)
I generated the issue with Codex (bug at prod), if you agree I can create a PR.
- Ngôn ngữ chính
- C#
- Star
- 464
- Fork
- 78
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của robinrodricks/FluentStorage
-
question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
robinrodricks/FluentStorage#178 · 7 bình luận ·
-
discussion help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
robinrodricks/FluentStorage#148 ·
-
response requested Wasabi
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
robinrodricks/FluentStorage#121 · 2 bình luận ·
-
maintainance work in progress
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
robinrodricks/FluentStorage#111 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
robinrodricks/FluentStorage#105 · 9 bình luận ·
Tất cả issue của robinrodricks/FluentStorage
Issue tương tự
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
erkamyaman/rust-anything#943 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SixLabors/ImageSharp.Drawing#438 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
NetSparkleUpdater/NetSparkle#762 ·
-
ANSIInitializer.Enabled getterĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100