multiple: true,
onComplete: function( id, fileName, responseJSON ) {
if( responseJSON.success )
- alert( "success!" ) ;
- else
- alert( "upload failed!" ) ;
+ console.log( "success!" ) ;
+ $('form#upload_form').attr('action', responseJSON.note_url);
+ $('input.submit_upload').show();
},
onAllComplete: function( uploads ) {
// uploads is an array of maps
// the maps look like this: { file: FileObject, response: JSONServerResponse }
- alert( "All complete!" ) ;
+ console.log( "All complete!" ) ;
},
params: {
'csrf_token': '{{ csrf_token }}',
'csrf_name': 'csrfmiddlewaretoken',
'csrf_xname': 'X-CSRFToken',
- 'course_id': course_pk,
+ 'course_id': {{ course.id }},
},
}) ;
});