Compress images only for NIP-96 endpoint

This commit is contained in:
2024-05-14 10:04:42 +01:00
parent 423fbfdb77
commit 8a58cfe825
4 changed files with 63 additions and 42 deletions

View File

@ -1,5 +1,3 @@
use std::sync::{Mutex, RwLock};
use chrono::Utc;
use log::error;
use nostr::prelude::hex;
@ -108,7 +106,7 @@ async fn upload(
.unwrap_or("application/octet-stream".to_string());
match fs
.put(data.open(ByteUnit::from(settings.max_upload_bytes)), &mime_type)
.put(data.open(ByteUnit::from(settings.max_upload_bytes)), &mime_type, false)
.await
{
Ok(blob) => {