RailsCasts Pro episodes are now free!

Learn more or hide this

Duncan Miller's Profile

GitHub User: duncanjmiller

Site: http://www.cammpus.com

Comments by Duncan Miller


Adding the stop callback to the paintings.js.coffee file worked for me.

jQuery ->
    dataType: "script"
    add: (e, data) ->
      file = data.files[0]
      data.context = $(tmpl("template-upload", file))
    progress: (e, data) ->
      if data.context
        progress = parseInt(data.loaded / data.total * 100, 10)
        data.context.find('.bar').css('width', progress + '%')
    stop: (e, data) ->