0

I'm trying to upload a pdf file to dropbox through rails and convert the pages in the pdf into jpeg images and store those images in the same dropbox folder. I tried using Docsplit gem but i dont know how to address the file inthe drop box in code.

Docsplit.extract_images(@collection.file.url, :format => [:jpeg])

file.url shoul return the file right? or any other ways??

thanks,

  • 1
    `@collection` is nil. Hence the error. – j-dexx Jan 20 '17 at 10:44
  • You should inspect why `@collection` is nil. The message means that you can't call the method `file` on a nil object, because the method is not defined for it. – guitarman Jan 20 '17 at 10:57

0 Answers0