The server now doesnt read files by itself, client must do it
This commit is contained in:
parent
7d6ed06166
commit
707d4be631
5 changed files with 70 additions and 40 deletions
|
|
@ -84,8 +84,8 @@ impl HttpApi {
|
|||
) -> Result<impl IntoResponse> {
|
||||
let opts = params.into_add_torrent_options();
|
||||
let add = match String::from_utf8(data.to_vec()) {
|
||||
Ok(s) => AddTorrent::from(s),
|
||||
Err(e) => AddTorrent::from(e.into_bytes()),
|
||||
Ok(s) => AddTorrent::Url(s.into()),
|
||||
Err(e) => AddTorrent::TorrentFileBytes(e.into_bytes().into()),
|
||||
};
|
||||
state.api_add_torrent(add, Some(opts)).await.map(axum::Json)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue