Import statuses into Mastodon manually
1
2
3
4
5
6
7
8
9
10
#!/bin/env ruby
require '/opt/mastodon/config/environment.rb'
def create_attachment(user,media)
media_url = "https://bhlg-us.nyc3.cdn.digitaloceanspaces.com/#{media}"
puts media_url
unless File.directory?(File.dirname(media))
FileUtils.mkdir_p File.dirname(media)