uploads: centralise via ChatHubApi::save_upload, refactor handlers
Nightly Build / build (push) Successful in 6m41s
Nightly Build / build (push) Successful in 6m41s
Extract shared upload seam in skald-core, move Telegram and web handlers to use it. Simplify media attachment routing. Clean up unused deps and dead code.
This commit is contained in:
@@ -12,9 +12,10 @@
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// One file attached by the user to a message. `path` is relative to the project
|
||||
/// root (e.g. `data/uploads/123/file.pdf`) so it is both servable under `/data/…`
|
||||
/// and resolvable by the filesystem tools.
|
||||
/// One file attached by the user to a message. `path` is a home-relative agent
|
||||
/// path (e.g. `uploads/123/file.pdf`) — the caller's container home is its root,
|
||||
/// so the fs-tools, `execute_cmd`, the file viewer (`/api/file`) and the media
|
||||
/// inliner all resolve it to the same physical file.
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Attachment {
|
||||
pub path: String,
|
||||
|
||||
Reference in New Issue
Block a user