mirror of
https://github.com/thegeneralist01/archivr
synced 2026-07-21 18:55:36 +02:00
feat(core): generic HTTP/S file URL capture (Track 1)
- Add crates/archivr-core/src/downloader/http.rs
- download(url, store_path, timestamp) -> Result<(hash, extension)>
- Rejects text/html responses with a clear error
- Derives extension from URL path or Content-Type header
- Follows redirects (capped at 10), user-agent archivr/0.1
- 10 unit tests for extension/content-type helpers
- Add Source::Url variant to capture::Source enum
- determine_source: unmatched http/https URLs route to Source::Url
- source_metadata: Source::Url => ("web", "file", "file")
- generate_entry_title: Source::Url arm -> "Downloaded File" fallback
- perform_capture: Source::Url arm calls http::download, uses existing
temp -> hash_exists -> move_temp_to_raw -> record_media_entry pipeline
- Update test expectations: 3 plain https:// cases now expect Source::Url
- Add reqwest 0.12 (blocking) to workspace and archivr-core deps
- Mark URLs milestone done in docs/README.md
- Update NEXT.md Track 1 status
This commit is contained in:
parent
a76dcf647f
commit
03abfb4d18
7 changed files with 1017 additions and 19 deletions
|
|
@ -27,3 +27,4 @@ toml = "0.8.19"
|
|||
tower = "0.5.1"
|
||||
tower-http = { version = "0.6.2", features = ["fs", "trace"] }
|
||||
uuid = { version = "1.18.1", features = ["v4"] }
|
||||
reqwest = { version = "0.12", features = ["blocking"] }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue