File Download Service
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc config/storage.yml và config/environments/production.rb, sau đó tìm FileDownloader, ChecksumVerifier, luồng đính kèm của ActiveStorage và model TopicFile. Công việc được xem là hoàn tất khi các lượt tải xuống có thể tiếp tục từ các tệp chưa hoàn chỉnh, lỗi checksum thực hiện việc dọn dẹp và thử lại, bộ nhớ cục bộ được cấu hình để sử dụng ngoại tuyến, đồng thời các yêu cầu dọn dẹp và sao lưu của TopicFile được giải quyết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
GET /api/v1/files/{id} with resume support
- Create FileDownloader service:
class FileDownloader
def download(file_id, expected_checksum:, resume_from: 0)
# Downloads to temp file
# Supports Range header for resume
# Returns path to downloaded file
end
end
- Download to temp directory (tmp/downloads/)
- Track partial download progress for resume capability
- Return downloaded file path for attachment
Verify downloaded files match manifest checksums
- Create ChecksumVerifier service:
class ChecksumVerifier
def verify!(file_path, expected_sha256)
actual = Digest::SHA256.file(file_path).hexdigest
expected = expected_sha256.delete_prefix("sha256:")
raise ChecksumMismatchError unless actual == expected
end
end
- Consider using MD5 since active storage uses MD5 for checksums
- Integrate verification before ActiveStorage attachment
- On mismatch: delete file, retry download (up to 3 attempts)
Ensure proper ActiveStorage setup for offline operation
- Verify config/storage.yml uses local disk:
local:
service: Disk
root: <%= Rails.root.join("storage") %> - Set in config/environments/production.rb:
config.active_storage.service = :local - Configure blob cleanup: old blobs purged when TopicFile destroyed
- Add storage/ to backup strategy
- Ngôn ngữ chính
- HTML
- Star
- 4
- Fork
- 0
- 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
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọ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 rubyforgood/skillrx-beacon
-
cross-app sync
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Error handlingĐang mởcross-app sync
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
cross-app sync
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
Sync OrchestratorĐang mởcross-app sync
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Orphan Cleanup ServiceĐang mởcross-app sync
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Tất cả issue của rubyforgood/skillrx-beacon
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Backend issue lists report in-patch warnings and out-of-patch errors as not publishableCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mozilla/code-review#3794 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Upgrade listener stays on a custom server after close when `preClose` is setCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fastify/fastify-websocket#388 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
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
DietrichGebert/ponytail#1343 ·
Maintainer thường phản hồi trong vòng 1 ngày