Doubts about uploading an image

0

I'm using an upload class in php, it's actually working, I can upload and display it, but when I go to the folder inside the project the files are not there.

I've put it to view hidden files nothing appears, I already used the CMD to list the contents of the folder and nothing, I'm not saving in database, I have already looked inside the class if there is any reference that creates the file in hidden mode and nothing. I wanted some help to know where these files are going to stop. I've never seen this ... upload and the file does not stay anywhere, and still work normally by calling the url correctly ... I already looked at my pc ...

Use this Upload Class

  

link

php file that instantiates the class and sets the way of sending and etc ...     

if($image["pictures"]){
    $image->setLocation(__DIR__ . "\usuarios");
    $upload = $image->upload();
    if($upload){
        echo "<img src='http://sdspot.com.br/suporte/upload/usuarios/".$upload->getName().".".$image->getMime()."' alt=''>";
        echo $upload->getFullPath();
    }else{
        echo $image->getError();
    }
}

?>

File that sends the image file

<html>
<body>
<form method="POST" enctype="multipart/form-data" action="Upload.php">
    <input type="hidden" name="MAX_FILE_SIZE" value="1000000"/>
    <input type="file" name="pictures" accept="image/*"/>
    <input type="submit" value="upload"/>
</form>
</body>
</html>

IMG - 1 IMG-2 IMG-3

    
asked by anonymous 28.11.2018 / 15:23

1 answer

0

Hello, from what I saw of your code and Upload Class, I believe it's in the users directory of your computer! Have you checked? When I create a directory for images in applications I create a dedicated eg imgs_products and saved everything there and in the database I just saved the filename and its extension

    
28.11.2018 / 15:30