我需要使用 Docsplit 获取存储在 Ruby on Rails 5.2.3 ActiveStorage 中的 PDF 文件的页数。
我正在使用 Ruby on Rails ActiveStorage 上传 PDF 文档。我了解这些文档存储为 blob。我希望我可以将 PDF 文件的引用传递给 Docsplit,例如:
pages = Docsplit.extract_length(@car_record.crecord)
但是上面导致了一个错误:
no implicit conversion of ActiveStorage::Attached::One into String