Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Projet ISIS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MARQUE Pierre
Projet ISIS
Commits
0dfd5937
Commit
0dfd5937
authored
Mar 28, 2022
by
Okthane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arf
parent
2ff8ce08
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
9 deletions
+8
-9
pierremarque.jpg
img/pierremarque.jpg
+0
-0
pierremarqueNO-BG.png
img_bg/pierremarqueNO-BG.png
+0
-0
index.php
index.php
+1
-1
removeBackground2.php
removeBackground2.php
+2
-2
script.js
script.js
+5
-6
No files found.
img/pierremarque.jpg
0 → 100644
View file @
0dfd5937
19.3 KB
img_bg/pierremarqueNO-BG.png
View replaced file @
2ff8ce08
View file @
0dfd5937
152 KB
|
W:
|
H:
192 KB
|
W:
|
H:
2-up
Swipe
Onion skin
index.php
View file @
0dfd5937
...
...
@@ -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>
...
...
removeBackground2.php
View file @
0dfd5937
...
...
@@ -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
'
]
]);
...
...
script.js
View file @
0dfd5937
...
...
@@ -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'
]);
})
}
})
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment