不知道这是怎么回事:
file = Rails.root.join(Attachment.last.attachment.url(:original))
# => "/system/attachments/3/original/!my_awesome_pdf.pdf?1359735260"
然后我尝试这样做:
File.new(file, 'rb')
# => No such file or directory - /system/attachments/3/original/!my_awesome_pdf.pdf?1359735260
为什么会这样?我正在尝试能够选择要上传到 GroupDocs.com 的文件