@@ -460,8 +460,7 @@ impl Client {
460460 thumbnail : Option < Thumbnail > ,
461461 send_progress : SharedObservable < TransmissionProgress > ,
462462 ) -> Result < ( MediaSource , Option < ( MediaSource , Box < ThumbnailInfo > ) > ) > {
463- let upload_thumbnail =
464- self . upload_encrypted_thumbnail ( thumbnail, content_type, send_progress. clone ( ) ) ;
463+ let upload_thumbnail = self . upload_encrypted_thumbnail ( thumbnail, send_progress. clone ( ) ) ;
465464
466465 let upload_attachment = async {
467466 let mut cursor = Cursor :: new ( data) ;
@@ -480,7 +479,6 @@ impl Client {
480479 async fn upload_encrypted_thumbnail (
481480 & self ,
482481 thumbnail : Option < Thumbnail > ,
483- content_type : & mime:: Mime ,
484482 send_progress : SharedObservable < TransmissionProgress > ,
485483 ) -> Result < Option < ( MediaSource , Box < ThumbnailInfo > ) > > {
486484 let Some ( thumbnail) = thumbnail else {
@@ -490,7 +488,7 @@ impl Client {
490488 let mut cursor = Cursor :: new ( thumbnail. data ) ;
491489
492490 let file = self
493- . upload_encrypted_file ( content_type, & mut cursor)
491+ . upload_encrypted_file ( & thumbnail . content_type , & mut cursor)
494492 . with_send_progress_observable ( send_progress)
495493 . await ?;
496494
0 commit comments