fix: missing content-type when changing avatar

This commit is contained in:
Jindra 2021-09-15 09:35:58 +02:00
parent 03f82d84b9
commit d8f642372e
1 changed files with 5 additions and 1 deletions

View File

@ -727,7 +727,11 @@ class Client extends MatrixApi {
/// Uploads a new user avatar for this user. /// Uploads a new user avatar for this user.
Future<void> setAvatar(MatrixFile file) async { Future<void> setAvatar(MatrixFile file) async {
final uploadResp = await uploadContent(file.bytes, filename: file.name); final uploadResp = await uploadContent(
file.bytes,
filename: file.name,
contentType: file.mimeType,
);
await setAvatarUrl(userID, uploadResp); await setAvatarUrl(userID, uploadResp);
return; return;
} }