mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 22:23:23 +00:00
Fix webcam upload
This commit is contained in:
parent
c4b1494eee
commit
3667a12174
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user