80802

File uploading rails 3

Question:

I have a rails 3 app that has a comment system that allows a user to make comments. What I now wish to do is extend this further by enabling the user to attach/upload files to the comment system. Fairly easy question I am about to ask. What is the best tool/plugin or gem to use so that I can achieve this? I've done some thorough research and found that alot of these plugins such as carrierwave, paperclip and a few others are used to upload photos and I am not trying to do this.

Requirements

<ul><li>User should be able to upload/attach files </li> <li>Can upload word, powerpoint or execel docuements </li> </ul>

Answer1:

Both carrierwave and paperclip can be used to upload any type of files - they have extra features if you want to upload images, but they are not restricted to handling just image files. In the end it's a matter of preference. I found both paperclip and carrierwave to be very good at what they do.

Answer2:

<a href="http://railscasts.com/episodes/134-paperclip" rel="nofollow">Paperclip</a>

<a href="http://railscasts.com/episodes/253-carrierwave-file-uploads" rel="nofollow">CarrierWave</a>

As for me CarrierWave more modern and nice solution. Have a try.

Answer3:

You can use even dragonfly - <a href="https://github.com/markevans/dragonfly/" rel="nofollow">https://github.com/markevans/dragonfly/</a>

Recommend

  • Can I use Paperclip for comments in rails and how?
  • uninitialized constant AWS::S3::NoSuchBucket
  • Paperclip::Errors::MissingRequiredValidatorError
  • function to check array strpos and return an array
  • Paperclip in Production with Unicorn: uninitialized constant Paperclip (NameError)
  • Scope in JavaScript / jQuery [duplicate]
  • how to edit project settings in xcode 4.2?
  • calling a VB.net function from javascript
  • PHP: black image when cropping using php
  • Mongodb $addToSet of nested object
  • Working with big files in classic ASP
  • Calling PowerShell's where-object from C#
  • CSS transition glitch
  • SEO friendly 301 redirect .htm to .aspx
  • Odd function behaviour with Tkinter
  • Shadows for Instantiated Game Object bug?
  • composer dependency stating in doesn't have php-xsl
  • Heroku push rejected - Hartl's Rails 3.2 tutorial
  • What is the equivalent of Android permissions in iOS development? [duplicate]
  • Extending the Django 1.11 User Model
  • python: forcing relative imports to search from script file
  • EntLib Way to Bind “Null” Value to Parameter
  • Jenkins Grails plugin does not list lastest versions of Grails
  • Iron Router: How do I send data to the layout?
  • Click on button in another program - FindWindow, C#
  • VSCode change debug shell to bash on windows
  • Does Apple allow the usage of sysctl.h within iOS applications?
  • Django model inheritance, filtering models
  • Ember.js model to be organised as a tree structure
  • Create Instant using a negative year
  • How to generate and display a QR Code in ionic 2
  • Moving mysql files across servers
  • Could not find rake using whenever rails
  • why do I get the error when installing the gem 'pg'? [duplicate]
  • Ajax Loaded meta Tags
  • Xamarin Forms - UWP Fonts
  • Is possible to count alias result on mysql
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • Arrays break string types in Julia
  • Benchmarking RAM performance - UWP and C#