@@ -58,7 +58,7 @@ use vodozemac::Curve25519PublicKey;
58
58
59
59
use self :: {
60
60
backups:: { types:: BackupClientState , Backups } ,
61
- futures:: PrepareEncryptedFile ,
61
+ futures:: UploadEncryptedFile ,
62
62
identities:: { Device , DeviceUpdates , IdentityUpdates , UserDevices , UserIdentity } ,
63
63
recovery:: { Recovery , RecoveryState } ,
64
64
secret_storage:: SecretStorage ,
@@ -438,17 +438,17 @@ impl Client {
438
438
/// # let client = Client::new(homeserver).await?;
439
439
/// # let room = client.get_room(&room_id!("!test:example.com")).unwrap();
440
440
/// let mut reader = std::io::Cursor::new(b"Hello, world!");
441
- /// let encrypted_file = client.prepare_encrypted_file (&mime::TEXT_PLAIN, &mut reader).await?;
441
+ /// let encrypted_file = client.upload_encrypted_file (&mime::TEXT_PLAIN, &mut reader).await?;
442
442
///
443
443
/// room.send(CustomEventContent { encrypted_file }).await?;
444
444
/// # anyhow::Ok(()) };
445
445
/// ```
446
- pub fn prepare_encrypted_file < ' a , R : Read + ?Sized + ' a > (
446
+ pub fn upload_encrypted_file < ' a , R : Read + ?Sized + ' a > (
447
447
& ' a self ,
448
448
content_type : & ' a mime:: Mime ,
449
449
reader : & ' a mut R ,
450
- ) -> PrepareEncryptedFile < ' a , R > {
451
- PrepareEncryptedFile :: new ( self , content_type, reader)
450
+ ) -> UploadEncryptedFile < ' a , R > {
451
+ UploadEncryptedFile :: new ( self , content_type, reader)
452
452
}
453
453
454
454
/// Encrypt and upload the file and thumbnails, and return the source
@@ -465,7 +465,7 @@ impl Client {
465
465
466
466
let upload_attachment = async {
467
467
let mut cursor = Cursor :: new ( data) ;
468
- self . prepare_encrypted_file ( content_type, & mut cursor)
468
+ self . upload_encrypted_file ( content_type, & mut cursor)
469
469
. with_send_progress_observable ( send_progress)
470
470
. await
471
471
} ;
@@ -491,7 +491,7 @@ impl Client {
491
491
let mut cursor = Cursor :: new ( thumbnail. data ) ;
492
492
493
493
let file = self
494
- . prepare_encrypted_file ( content_type, & mut cursor)
494
+ . upload_encrypted_file ( content_type, & mut cursor)
495
495
. with_send_progress_observable ( send_progress)
496
496
. await ?;
497
497
0 commit comments