How can I migrate files from the old upload scheme (default/XXX) to the new one (default/original/{1,2}X)?

Yes, this was recently added by @tgxworld. I’ve fixed the query in my post and in the uploads:migrate_to_s3 rake task.

Upload.by_users.where("url NOT LIKE '//%' AND url NOT LIKE '/uploads/default/original/_X/%'").exists?

Didn’t get a chance to look at it just yet…

3 Likes