use photo

This commit is contained in:
2023-02-04 14:14:09 +11:00
parent e8cb8ca5d7
commit 14db39d5e9

View File

@@ -28,8 +28,8 @@ module Adamantium
key = Digest::MD5.hexdigest text_with_tags
mastodon_token = settings.mastodon_token
mastodon_server = settings.mastodon_server.split("@").first
media_ids = post[:photos]&.map do |photo|
logger.info(post[:photo])
media_ids = post[:photo]&.map do |photo|
file = Tempfile.new(SecureRandom.uuid)
file.write(URI.open(photo["value"]).read)
file.rewind