我想在压缩后从我的网站下载照片.我使用rubyZip gem但无法压缩远程文件.以下是场景:
我正在尝试从服务器压缩内容.内容就是这样的
http://myApplication.s3.amazonaws.com/xxxxxxxx/image/image1.jpeg,
所以在"zipfile.add(attachment.document_file_name,attachment.document.url)"中,我分配了以下值:
document_file_name = image1.jpeg/image2.jpeg/image3.jpeg document.url = http://myApplication.s3.amazonaws.com/xxxxxxxx/image
现在我在这里得到以下错误:
没有这样的文件或目录 - myApplication.s3.amazonaws.com/xxxxxxxx/image
如果我从本地文件系统(例如:/ home/user/images)压缩文件而不是远程文件压缩文件,这个gem工作正常.
我做错了吗?有人可以帮我吗?或者任何其他可以做到这一点的宝石?
谢谢,-Tahniyat