Private
Public Access
1
0

Adds CONTENT_LENGTH workaround for CocoaHTTPServer bug

This commit is contained in:
2025-06-12 21:19:47 -07:00
parent ff03e73758
commit 4f40be205d
4 changed files with 26 additions and 9 deletions

View File

@@ -195,7 +195,10 @@ impl AttachmentStore {
let filename = incoming_path.file_name().unwrap().to_str().unwrap();
log::trace!(target: target::ATTACHMENTS, "Uploading attachment to server: {}", &filename);
let mut client = Daemon::get_client_impl(database).await?;
let guid = client.upload_attachment(reader, filename).await?;
let metadata = std::fs::metadata(&temporary_path)?;
let size = metadata.len();
let guid = client.upload_attachment(reader, filename, size).await?;
// Delete the temporary file.
log::debug!(target: target::ATTACHMENTS, "Upload completed with guid {}, deleting temporary file: {}", guid, temporary_path.display());