Skip to content

Commit 115538c

Browse files
committed
drop content-md5 from desktop upload
1 parent c8d807e commit 115538c

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

apps/desktop/src-tauri/src/upload.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,6 @@ fn multipart_uploader(
647647
let Chunk { total_size, part_number, chunk } = item.map_err(|err| format!("uploader/part/{:?}/fs: {err:?}", prev_part_number.map(|p| p + 1)))?;
648648
trace!("Uploading chunk {part_number} ({} bytes) for video {video_id:?}", chunk.len());
649649
prev_part_number = Some(part_number);
650-
let md5_sum = base64::encode(md5::compute(&chunk).0);
651650
let size = chunk.len();
652651

653652
// We prefetched for the wrong chunk. Let's try again.
@@ -663,7 +662,6 @@ fn multipart_uploader(
663662
.build()
664663
.map_err(|err| format!("uploader/part/{part_number}/client: {err:?}"))?
665664
.put(&presigned_url)
666-
.header("Content-MD5", &md5_sum)
667665
.header("Content-Length", chunk.len())
668666
.timeout(Duration::from_secs(120))
669667
.body(chunk)

apps/desktop/src-tauri/src/upload_legacy.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,6 @@ impl InstantMultipartUpload {
913913
"videoId": video_id,
914914
"uploadId": upload_id,
915915
"partNumber": *part_number,
916-
"md5Sum": &md5_sum
917916
}))
918917
})
919918
.await
@@ -972,7 +971,6 @@ impl InstantMultipartUpload {
972971

973972
match client
974973
.put(&presigned_url)
975-
.header("Content-MD5", &md5_sum)
976974
.timeout(Duration::from_secs(120))
977975
.body(chunk.clone())
978976
.send()

0 commit comments

Comments
 (0)