Fix filenames

This commit is contained in:
Inex Code 2022-04-21 06:59:24 +00:00
parent 42fb1e5c0a
commit d455883369

View file

@ -82,7 +82,7 @@ Future<void> _postOnMastodon(reqJson) async {
final photoUrls = photos.map((photo) {
final photoUrl = photo['photo']['sizes'].last['url'];
final photoPath =
'${Directory.systemTemp.path}/${photoUrl.split('/').last}';
'${Directory.systemTemp.path}/${photoUrl.split('/').last.split('?').first}';
dio.download(photoUrl, photoPath);
return photoPath;
});