From 3667a12174e37b92b764fbe76ee29d783892839f Mon Sep 17 00:00:00 2001 From: Skia Date: Mon, 29 Aug 2016 04:58:25 +0200 Subject: [PATCH] Fix webcam upload --- core/templates/core/user_edit.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/templates/core/user_edit.jinja b/core/templates/core/user_edit.jinja index 5610f02d..a54066b4 100644 --- a/core/templates/core/user_edit.jinja +++ b/core/templates/core/user_edit.jinja @@ -66,7 +66,7 @@ var data_uri = Webcam.snap(); var url = "{{ url('core:user_profile_upload', user_id=form.instance.id) }}"; Webcam.upload( data_uri, url, function(code, text) { - if (code == 200) { + if (code == 302 || code == 200) { $('#new_profile').attr('src', data_uri); $('#take_picture').remove(); $('#id_profile_pict').remove();