0
Good afternoon,
I have a form in which an image is uploaded, when it is uploaded I receive the photo as array below, in php it creates a temporary file in the case tmp_name.
I need to show the photo of this temporary file, because the form is invalidated so the image is still on tmp_name, that is shows the photo saved in this temporary file, and my doubt is how I access this temporary file showing the image ?
I already tried to do tpm_name concatenating with name tmp_name . / . name, however it does not bring this is my question which way to consume this temporary file is possible?
'foto' => array(
'name' => 'brasao_1548090804.jpg',
'type' => 'image/jpeg',
'tmp_name' => 'C:\xampp\tmp\phpAAF9.tmp',
'error' => (int) 0,
'size' => (int) 74954
)
To display the file, you first need to move it to a publicly accessible location. The temporary directory is not public
– bfavaretto
it worked out vlw...
– Victor Padovan
You say this to save the image file or to show at the same time the user inserts the input?
– Guilherme Evangelista