Try force multipart
This commit is contained in:
@@ -38,13 +38,13 @@ module Adamantium
|
|||||||
Authorization: "Bearer #{mastodon_token}"
|
Authorization: "Bearer #{mastodon_token}"
|
||||||
},
|
},
|
||||||
body: {
|
body: {
|
||||||
file: file.read,
|
file: file,
|
||||||
description: photo[:alt]
|
description: photo[:alt]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
file.close
|
file.close
|
||||||
file.unlink
|
file.unlink
|
||||||
logger.info(response.body)
|
logger.info(response.code)
|
||||||
|
|
||||||
JSON.parse(response.body, symbolize_names: true).fetch(:id, nil)
|
JSON.parse(response.body, symbolize_names: true).fetch(:id, nil)
|
||||||
end&.compact
|
end&.compact
|
||||||
|
Reference in New Issue
Block a user