Adds CONTENT_LENGTH workaround for CocoaHTTPServer bug
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user