DMCA - Remove Individual Image Best Practices

Just open a rails console and enter the following, replacing the large string with the large string in the image URL. If this is an optimized image then remove everything starting from the first underscore (_).

Upload.find_by_sha1('c35ab963fb22f8612697923ebc98d341693cfa1d').posts.each do |p| 
     puts p.url
end

This will give you the URL(s) to one or more posts that contain the image.

This code will give you the paths to the image and all associated optimized images, assuming local storage.

u = Upload.find_by_sha1('c35ab963fb22f8612697923ebc98d341693cfa1d')
puts u.url
u.optimized_images.each do |oi|
  puts oi.url
end
5 Likes