Uploading files in Rails

后端 未结 2 1161
野的像风
野的像风 2021-01-24 02:17

I want to make a section in my site where visitors can upload files (pdfs). How can this be done?

Also, after the pdf is uploaded, I need a link to that file. Rather th

2条回答
  •  遥遥无期
    2021-01-24 02:58

    For the Uploading part you might consider ActsAsAttachment or (as already stated) Paperclip.

    I am not aware of any plugin for rails which is able to create/read thumbnails from PDF files automatically, but you could invoke LibExtractpr or GhostScript from your code.

    Additionally you might take a look at the rGhost Gem which (as the documentation states) is a "a document creation and conversion API" which essentially should be a GhostScript Wrapper for Ruby.

提交回复
热议问题