Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道使用 S3 使用 Paperclip 复制文件进行存储的方法?在我尝试自己编写之前,我只是想确保没有办法做到这一点。谢谢
在用回形针弄乱了一些之后,我想通了。复制文件非常简单!
# Stupid example method that just copies a user's profile pic to another user. def copy_profile_picture(user_1, user_2) user_2.picture = user_1.picture user_2.save # Copied the picture and we're done! end
这也适用于亚马逊 s3。甜的