Aurigma Image uploader

Hi,
Any one have any idea about using aurigma image uploader in rails.
I am trying to implement it in my application.
I followed following steps:
Copied HTML source in index.rb to index.html.erb
Installed paperclip to store images.
The request to upload sent to create method in
images_controller
Retrieve images from post data
Save images to DB through paperclip

      My code works fine till this point. Images are cropped, saved

properly to DB.
But after that when I want to redirect it gives me error in a
alert box saying
Server attempted to redirect you to
http://localhost:3000/profile/2/images, but server
redirects are not supported.

Please help me out of this.

Pravin M. wrote:

Please help me out of this.

Kind of hard when we have no example from your code…

What does your controller code look like?

Ar Chron wrote:

Pravin M. wrote:

Please help me out of this.

Kind of hard when we have no example from your code…

What does your controller code look like?

Here is my controller code

def create
no_of_files = 0
params_keys = params.keys.size
for k in 0…params_keys
no_of_files += 1 if params[“SourceFile_#{k}”]
end
if no_of_files < 4
@advert = Advert.find(params[:advert_id])
for i in 1…no_of_files
@image = Image.new
@image.photo = params[“SourceFile_” + i.to_s]#.first
@image.image_type = “Advert”
@advert.images << @image
end
redirect_to advert_path(@advert)
#render :template => “adverts/show”
else
flash[:error] = “You can upload maximum 4 images for an advert.”
redirect_to adverts_path
end
end

Hello,

Please read discussion on this problem on Aurigma managed forums:

On 26 июн, 19:54, Pravin M. [email protected]

Here is my controller code
Also,
protect_from_forgery :except => [“create”]