Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
fix: update upload image file extension (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed May 16, 2021
1 parent 529542a commit 47e237d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/share/bloc/share_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class ShareBloc extends Bloc<ShareEvent, ShareState> {
final file = XFile.fromData(
event.bytes,
mimeType: 'image/png',
name: '$imageId.png',
name: _getPhotoFileName(imageId),
);
final bytes = event.bytes;

Expand Down Expand Up @@ -209,5 +209,5 @@ class ShareBloc extends Bloc<ShareEvent, ShareState> {
return Uint8List.fromList(composite);
}

String _getPhotoFileName(String photoName) => '$photoName.jpg';
String _getPhotoFileName(String photoName) => '$photoName.png';
}

0 comments on commit 47e237d

Please sign in to comment.