I can't seem to find clarification. I have 7 steps and the second one is to upload a file. The problem I am having is that on the final step when I finalize the form and try and access the temp file it says "Could not access file: ..." (saved in the default tmp folder).
Other multi-step tutorials say to keep it in a temp folder and then move to the appropriate folder when complete. So do they mean I move it from the default temp folder into a temp folder I manage and then when they complete the form move it again to a final folder?
So do they mean I move it from the default temp folder into a temp folder I manage and then when they complete the form move it again to a final folder?
Yes, exactly. You do the first move on the request that receives the files, because when that request is finished PHP would delete them if they still exist.
See move_uploaded_fileDocs and Handling File Uploads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With