Sunday, September 11, 2011

[Rails] Re: Image upload with progress bar

Hi Ron,

thank you for link. I tried to update my code by your tutorial and I
bumped on 2 problems.

The first one - if I will send the form with data, so all of my session
variables will be destroyed.
The second one - I don't know why, but co-working between the form and
paperclip plugin not works. Text data are stored into DB table, but the
image is not uploaded.

In my model (photo.rb) I have:

has_attached_file :photo

and in JS:
qp.album_id = document.getElementById('photo_album_id').value;
qp.attachment_model_name = 'photo';
qp.attachment_model_id = null;
qp.file_model = 'photo';

Could you help me, please, where could be a problem? I am struggling
with this problem the whole weekend, but I still don't know, why it
doesn't work me...

Thank you million times!

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate