即使存在,也无法使用Paperclip访问上传的文件(Paperclip这样说)

时间:2019-09-20 12:29:08

标签: ruby-on-rails file-upload paperclip

form.class.name
# => "Paperclip::Attachment"

form.exists?
# [AWS S3 200 0.777744 0 retries] head_object(:bucket_name=>"xyz",:key=>"xyz/forms/000/000/070/original/49700868636-868088611-ticket.pdf")
# => true

form.uploaded_file
# => nil

form.url
# => https://s3.amazonaws.com/xyz/prize_payments/forms/000/000/070/original/49700868636-868088611-ticket.pdf

怎么可能? Paperclip如何说该文件存在,但在调用uploaded_file时不返回文件?

我怀疑这是权限问题,因为我可以在浏览器中通过其URL访问该文件。

0 个答案:

没有答案