Fix photo upload issue

This commit is contained in:
2024-04-27 20:23:24 +10:00
parent b95236d832
commit 27d73ca364

View File

@@ -60,7 +60,7 @@ module Adamantium
file_size = file.size.to_f / 2**20 file_size = file.size.to_f / 2**20
formatted_file_size = "%.2f" % file_size formatted_file_size = "%.2f" % file_size
return if formatted_file_size > 2.0 return if formatted_file_size.to_i > 2.0
response = HTTParty.post("#{mastodon_server}api/v2/media", { response = HTTParty.post("#{mastodon_server}api/v2/media", {
headers: { headers: {