{"comment":{"created_at":"2011-10-26T05:30:13Z","body":"Hey,\r\n\r\nRemember that when you use: `<%= direct_upload_form_for @uploader %>`\r\nThe form will post *directly* to S3. If the upload is successful S3 redirects the user back to your application but it only includes the bucket, key and etag and nothing more.\r\n\r\nWhen I want to use this gem with a project such as yours, I would use a multi-stage form, so that the user can upload their avatar first in a form on it's own by selecting a file then pressing \"Next\", then you have the form to create their profile on the next page.","updated_at":"2011-10-26T05:30:13Z","url":"https://api.github.com/repos/dwilkie/carrierwave_direct/issues/comments/2526759","id":2526759,"user":{"avatar_url":"https://secure.gravatar.com/avatar/768cc7e112f643efcb03dd3d646320f3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"768cc7e112f643efcb03dd3d646320f3","url":"https://api.github.com/users/dwilkie","id":127583,"login":"dwilkie"}},"action":"created","issue":{"number":5,"created_at":"2011-10-24T20:30:59Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I'm not sure if this is the place for questions, so please delete it if innapropriate. I just couldn't find a forum or another place that seemed better suited.\r\n\r\nI'm uploading a user avatar with carrierwave, which works inside a regular form_for. So I get the avatar along with all the rest of the user info.\r\n\r\nHowever, with carrierwave_direct, something like this would not work, since I would need to nest the direct_upload_form_for inside a form_for. Something like this:\r\n\r\n    <%= form_for @user, :html => { :multipart => true } do |f| %>\r\n      <%= f.error_messages %>\r\n      <%= f.label \"What's your name?\" %>\r\n      <%= f.text_field :name %>\r\n      <%= f.label \"What's your birthday?\" %>\r\n      <%= f.date_select :birthday %>\r\n      <%= direct_upload_form_for @uploader do %>\r\n        <%= f.label \"Upload your avatar\" %>\r\n        <%= f.file_field :avatar %>\r\n        <%= f.submit %>\r\n      <% end %>\r\n      <%= f.submit =>\r\n    <% end %>\r\n\r\nAnyway to get around this? I would really love to avoid a flash uploader.\r\n\r\nThanks for the great gem! Hope I'm able to get it working on my scenario.","comments":1,"title":"Upload within a model form","updated_at":"2011-10-26T05:30:14Z","url":"https://api.github.com/repos/dwilkie/carrierwave_direct/issues/5","id":2038124,"assignee":null,"milestone":null,"closed_at":"2011-10-26T05:30:14Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/17593ac7ac6699f1a6d8983826c5a1b4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"17593ac7ac6699f1a6d8983826c5a1b4","url":"https://api.github.com/users/rapcal","id":620436,"login":"rapcal"},"html_url":"https://github.com/dwilkie/carrierwave_direct/issues/5","labels":[],"state":"closed"},"legacy":{"issue_id":2038124,"comment_id":2526759}}