Doubt about image upload

Asked

Viewed 45 times

0

I am using a php upload class, actually it’s all working, I can upload normal and display, but when I enter the respective folder inside the project the files are not there.

I have put to view hidden files nothing appears, I already used the CMD to list the contents of the folder and nothing, I’m not saving it in a database, I already searched inside the class if there is any reference that creates the file in hidden mode and nothing. I’d like to know where these files end up. I’ve never seen this.... upload and the file does not get anywhere, and even then work normally by calling the url correctly... I have looked up on my pc...

Use this Upload Class

https://github.com/samayo/bulletproof

php file that instantiates the class and configures the sending form 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 inserir a descrição da imagem aqui IMG - 2 inserir a descrição da imagem aqui IMG - 3 inserir a descrição da imagem aqui

1 answer

0

Hello, from what I saw of your code and the Upload Class, I believe this in the user directory of your computer! Have you checked? When I create a directory for images in applications I create a dedicated for example imgs_products and save everything there and in the database I only save the name of the file and its extension

  • My system is like this, Apache server on a server on the network, if it was on my machine only I could see the file using the URL, but on any machine of the network can see using the address sdspot.com.br

  • Hello, well I believe then that it is in this folder of the server inside the network! I believe the class itself points to the user directory within the server

  • it is, they appear in the browser only, but if I open the folder where it does not appear anything...

  • God, I’ve never seen anything like it! Sorry I couldn’t help

Browser other questions tagged

You are not signed in. Login or sign up in order to post.