1

I am trying to implement ajax file upload using Valums file uploader plugin( https://github.com/valums/file-uploader ), paperclip is doing the image processing for me and helping me in cropping it.

I know many you out there would wonder why I am using this config of Rails 2.0.2.. its mainly for project specific purposes..

I am still a newbie with just around 5 months of experience in Rails..

The overall objective I am trying to meet by using this plugin is to get ajax file upload + ajax display working for me.

Firstly I am trying to make sure that the image which is passed as a parameter and the appropriate processing takes place so that the image is saved in the DB.

The main challenge here for me at least is combining Rails(paperclip.. being the major part of it) + Valums file uploader .

With the help of different search queries in Google, I have finally found something that could really help my case:-

This( http://mooooooooooo.wordpress.com/2010/12/03/paperclip-valums%E2%80%99s-file-uploader-and-middleware-continued/ ) is a blog which pretty much does just what I want it to do..

If you can spare some time reading this blog , you would find that the bloggers ("moortens") approach is to make use of middleware and invoke the same through initializers..

I am pretty sure this blog is written some time after Rails 2.3.x came into existence.. and since I am still a newbie (please bear with me being a novice) and would have to make similar changes for my dev env which is Rails 2.0.2.. I am kinda lost.. figuring out how would I have to call the "raw_file_upload.rb" for me to get things working...

Kindly help me on this..

Thank you very much..

Vao Tsun
  • 47,234
  • 13
  • 100
  • 132
boddhisattva
  • 6,908
  • 11
  • 48
  • 72

0 Answers0