mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 14:45:36 +01:00
Fix
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
use base64::{engine::general_purpose, Engine};
|
||||||
use reqwest::{Response, multipart::{Form, Part}, header};
|
use reqwest::{Response, multipart::{Form, Part}, header};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use tracing::log;
|
use tracing::log;
|
||||||
@@ -57,10 +58,17 @@ pub async fn upload_to_telegram_files(
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
let filename = headers
|
let base64_encoder = general_purpose::STANDARD;
|
||||||
|
|
||||||
|
let filename = std::str::from_utf8(
|
||||||
|
&base64_encoder
|
||||||
|
.decode(
|
||||||
|
headers
|
||||||
.get("x-filename-b64-ascii")
|
.get("x-filename-b64-ascii")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.to_str()
|
)
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user