Commit 71fe3d49 authored by Ranindya Paramitha's avatar Ranindya Paramitha
Browse files

{FIXING] fileprocessing get profile picture, input pp only accept image

parent 4c186da6
......@@ -8,7 +8,7 @@ class fileProcessing {
}
public static function isExistProfileImage ($name): bool {
return file_exists('../uploads/'.$name.'.jpg');
return file_exists('../uploads/'.$name);
}
public static function getImageBookPathFromRoot (string $name): string {
......
......@@ -43,7 +43,7 @@
echo "<input id=\"profpict_dummy\" class=\"profpict_dummy\"type=\"text\" name=\"profile_picture2\" readonly>" ;
echo "<div class=\"upload-btn-wrapper\">" ;
echo "<button class=\"btn\">Browse ...</button>" ;
echo "<input id=\"profpict\" type=\"file\" name=\"profile_picture\" onchange=\"showname()\" >" ;
echo "<input id=\"profpict\" type=\"file\" name=\"profile_picture\" accept=\"image/png, image/jpg, image/jpeg\" onchange=\"showname()\" >" ;
echo "</div>" ;
echo "</div>" ;
echo "</div>" ;
......
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