Commit 0dfd5937 authored by Okthane's avatar Okthane

arf

parent 2ff8ce08
img_bg/pierremarqueNO-BG.png

152 KB | W: | H:

img_bg/pierremarqueNO-BG.png

192 KB | W: | H:

img_bg/pierremarqueNO-BG.png
img_bg/pierremarqueNO-BG.png
img_bg/pierremarqueNO-BG.png
img_bg/pierremarqueNO-BG.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -47,7 +47,7 @@
<!-- <button onclick="defaultBtnActive()" class="btn-form" id="custom-fileUpload">Choisissez une photo</button> -->
</div>
<div class="div-btn-form">
<input id="btnSubmit" type="submit" name="submit" value="Upload" class="btn-form">
<input id="btnSubmit" type="submit" name="submit" value="Vérifier" class="btn-form">
</div>
</form>
<script>
......
......@@ -21,7 +21,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST")
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if(array_key_exists($ext, $allowed))
{
$client = new GuzzleHttp\Client(['verify' => false]);
$client = new GuzzleHttp\Client(["verify"=>false]);
$res = $client->post('https://api.remove.bg/v1.0/removebg', [
'multipart' => [
[
......@@ -34,7 +34,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST")
]
],
'headers' => [
'X-Api-Key' => 'qYXf5PimffLjeH1i5B1rySQw'
'X-Api-Key' => 'LeteoyV7qPyWtAJF9Rcxenda'
]
]);
......
......@@ -55,6 +55,10 @@ $(document).ready(function(){
contentType: false,
processData: false
})
.fail(function(error){
Console.empty();
alert("La requête s'est terminée en échec. Infos : " + JSON.stringify(error));
})
.done(function(data){
console.log(data);
src = data['src'];
......@@ -65,12 +69,6 @@ $(document).ready(function(){
format_correct = true;
//Affichage de la photo
// findFaces();
})
.fail(function(error){
Console.empty();
alert("La requête s'est terminée en échec. Infos : " + JSON.stringify(error));
})
if(!errorFormat){
$.ajax({
//url de la requête
......@@ -92,6 +90,7 @@ $(document).ready(function(){
$("#img-ID2").attr('src',data['src']);
})
}
})
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment