Retrieve an already uploaded file using upload column

Hi
I am using the plugin upload column for file uploading…And it was
working properly with the code
@sd_activity_attachment=ServiceDeskActivityAttachment.new(params[:sd_activity_attachment])
@sd_activity_attachment.service_desk_activity_id=@sd_activity.id.to_i
@sd_activity_attachment.save
And in model ServiceDeskActivityAttachment
upload_column :attachment, :store_dir => proc{|inst, attachment|
“uploads/servicedeskactivity/#{inst.id}”}

And later according to my requiremnt I changed above controller code

and model code as
@sd_activity_attachment=ServiceDeskActivityAttachment.new(params[:sd_activity_attachment])
@sd_activity_attachment.service_desk_activity_id=@sd_activity.id.to_i
@sd_activity_attachment.company_name=session[:company] # setting company
from session to this model to store the respective attachment in company
specific folder

@sd_activity_attachment.save
And in model
attr_accessor :company_name
upload_column :attachment, :store_dir => proc{|inst, attachment|
“uploads/servicedeskactivity/#{inst.company_name}/#{inst.id}”}

      Now what happens is when i attach a file it goes to

RAILSROOT/public/uploads/servicedeskactivity/comp1/hello.jpg
But I can’t retrieve that file
And the file points to
http://localhost:3000/uploads/servicedeskactivity//1/hello.jpg
instead of

http://localhost:3000/uploads/servicedeskactivity/comp1/1/hello.jpg
I figure out where the error is.Please help.Any change
needed in source code of uploadcolumn?

Thanks in advance
Sijo

Hey I see that you are storing the image in “uploads/
servicedeskactivity/#{inst.id}” and you are checking it in “uploads/
servicedeskactivity/comp1/1/hello.jpg”. Is it a typing mistake or am I
wrong?. Hope that helps you.

Hi
I am storing
upload_column :attachment, :store_dir => proc{|inst, attachment|
“uploads/servicedeskactivity/#{inst.company_name}/#{inst.id}”}

Sijo