Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

tquill's Profile

GitHub User: tquill

Comments by


I figured it out.

First, change the target for your form (leave the "post" though).

<div id="upload_form">

  <%= s3_uploader_form post: user_url(@user), as: "user[avatar]" do %>
    <%= file_field_tag :file, multiple: false %>
  <% end %>

  <script id="template-upload" type="text/x-tmpl">
    <div class="upload">
      <div class="progress"><div class="bar" style="width: 0%"></div></div>


In the javascript file (I converted it from coffee script) change this line in the done callback:

$.post(to, content);


  type: "PUT",
  url: to,
  data: content

Did you ever figure this out? I'm looking to do the same thing.