I've got a PHP form which takes in both data and file upload. The following graphic shows the different parts of the form:

Part 1 - Allow user to input some form fields, and upload file.
Part 2 - Display the submitted details, and view uploaded file. If edits needed to be done, proceed to Part 2.1.
Part 2.1 - Edit Details
Part 3 - Write into database and shift uploaded file into folder.
Question:
1) In Part 2, I am able to get the file details using $_FILES["fileupload"]["name"]. Is there a way to view the file (click and open the file) when it's residing within the temp-location of the server?
2) Am I able to only do shifting of the file location when I'm in Step 3?
Q1maybe show file withbase64? forQ2don't knowmove_uploaded_file(), because the temporary file will become inaccessible to you once your invoked script ends. You could save it to your own temp folder and display it or whatever and later on move it again to its final destination. If you know the file is small, you could also save it in your session as a string and write it back to disk when saving your data.