From d455883369a985784bb61d80f85c4840fc32b6b4 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 21 Apr 2022 06:59:24 +0000 Subject: [PATCH] Fix filenames --- bin/server.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/server.dart b/bin/server.dart index dbdfd9e..0e81fba 100644 --- a/bin/server.dart +++ b/bin/server.dart @@ -82,7 +82,7 @@ Future _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; });