Fix webcam upload

This commit is contained in:
Skia 2016-08-29 04:58:25 +02:00
parent c4b1494eee
commit 3667a12174

View File

@ -66,7 +66,7 @@
var data_uri = Webcam.snap(); var data_uri = Webcam.snap();
var url = "{{ url('core:user_profile_upload', user_id=form.instance.id) }}"; var url = "{{ url('core:user_profile_upload', user_id=form.instance.id) }}";
Webcam.upload( data_uri, url, function(code, text) { Webcam.upload( data_uri, url, function(code, text) {
if (code == 200) { if (code == 302 || code == 200) {
$('#new_profile').attr('src', data_uri); $('#new_profile').attr('src', data_uri);
$('#take_picture').remove(); $('#take_picture').remove();
$('#id_profile_pict').remove(); $('#id_profile_pict').remove();