Self-host: every image upload adds a thumb_*.webp file to the user's bucket

Đang mở
#595 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend, database

Hướng nghiên cứu

Start with lib/services/storageProcessing.ts lines 122–161, where local storage creates and records thumbnails, then trace how file metadata is stored and how file deletion works. Check the storage file listing endpoint and related tests. Done when each thumbnail is stored with its original, is absent from file listings and bucket counts, and is removed when the original is deleted.

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

Mô tả

On the local storage driver, uploading an image larger than 200px schedules post-processing that writes a 200px WebP thumbnail and records it as an ordinary file in the same bucket:

https://github.com/backenly/backenly/blob/364c901eee7a1aaf46e3a0a4e5f16217b1b20591/lib/services/storageProcessing.ts#L122-L161

The thumbnail row has its own name (thumb_<stored name>.webp) and nothing links it to the original. So on a self-hosted install:

  • the console, GET /api/v1/{projectId}/storage/files, and any screen in the app that lists a user's files show a file the user never uploaded, for every image;
  • these rows count toward the 1,000 files per bucket limit;
  • deleting the original leaves its thumbnail behind.

Backenly Cloud's S3 driver does not run this step.

Done when a thumbnail is stored as part of its original (for example in the original's metadata) rather than as a separate listed file, and is removed with it.

Ngôn ngữ chính
TypeScript
Star
56
Fork
19
Merge trung bình
14 giờ 4 phút
Pull request đã merge (30 ngày)
366

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của backenly/backenly

Tất cả issue của backenly/backenly

Issue tương tự

Thêm issue về TypeScript

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.