laravel upload file from tmp to local file

WBOY
Release: 2016-08-04 09:21:44
Original
1193 people have browsed it

The customer submitted the picture and some requirements that he wanted to modify. After uploading the file, I did not save it to the server. Instead, I recorded the path of the tmp in the session. After the customer paid, I saved the tmp file to the server. This can be done What?

Reply content:

The customer submitted the picture and some requirements that he wanted to modify. After uploading the file, I did not save it to the server. Instead, I recorded the path of the tmp in the session. After the customer paid, I saved the tmp file to the server. This can be done What?

Actually, you don’t need to worry about whether to stay in tmp, because your purpose is to get this file, so just take it out (because whether you take it out or not depends on the server. The point is that if you don’t take it out, you won’t be able to get it next time, but you still can’t get it. will stay on the server for a while).

After taking it out, you can set up a temporary storage area in the storage directory and design a process to clean it regularly.

No way...it may be lost in tmp at any time, and due to permission issues, it may not be accessible after transfer without move_uploaded_file.

If you upload the file and don’t take it out, it will be lost immediately.

No, the files in tem will be lost at any time after the script life cycle is over

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!