mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 10:45:57 +03:00
Get host from client and put it in the attachments URL (only the web vault works without indicating the host in the URL)
This commit is contained in:
@@ -29,10 +29,10 @@ impl Attachment {
|
||||
format!("{}/{}/{}", CONFIG.attachments_folder, self.cipher_uuid, self.id)
|
||||
}
|
||||
|
||||
pub fn to_json(&self) -> JsonValue {
|
||||
pub fn to_json(&self, host: &str) -> JsonValue {
|
||||
use util::get_display_size;
|
||||
|
||||
let web_path = format!("/attachments/{}/{}", self.cipher_uuid, self.id);
|
||||
let web_path = format!("{}/attachments/{}/{}", host, self.cipher_uuid, self.id);
|
||||
let display_size = get_display_size(self.file_size);
|
||||
|
||||
json!({
|
||||
|
Reference in New Issue
Block a user