mirror of
https://github.com/timvisee/ffsend.git
synced 2025-10-06 10:39:57 +02:00
Fix broken download link due to moved URL functions
This commit is contained in:
parent
6e913428c2
commit
1f516d0dcb
1 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
extern crate chrono;
|
extern crate chrono;
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
|
|
||||||
|
use api::url::UrlBuilder;
|
||||||
use url::{
|
use url::{
|
||||||
ParseError as UrlParseError,
|
ParseError as UrlParseError,
|
||||||
Url,
|
Url,
|
||||||
|
@ -174,6 +175,13 @@ impl RemoteFile {
|
||||||
pub fn set_owner_token(&mut self, token: Option<String>) {
|
pub fn set_owner_token(&mut self, token: Option<String>) {
|
||||||
self.owner_token = token;
|
self.owner_token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Build the download URL of the given file.
|
||||||
|
/// This URL is identical to the share URL, a term used in this API.
|
||||||
|
/// Set `secret` to `true`, to include it in the URL if known.
|
||||||
|
pub fn download_url(&self, secret: bool) -> Url {
|
||||||
|
UrlBuilder::download(&self, secret)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Fail)]
|
#[derive(Debug, Fail)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue