Laravel uploading files from TMP to local files

Source: Internet
Author: User
The customer submits the picture which wants to make the modification and some needs, after uploading the file, I did not save to the server, but to record the TMP path in the session, after the customer pays the tmp file in the server, this can do?

Reply content:

The customer submits the picture which wants to make the modification and some needs, after uploading the file, I did not save to the server, but to record the TMP path in the session, after the customer pays the tmp file in the server, this can do?

In fact, you do not have to dwell on whether to stay in TMP, because your purpose is to this file, so take it out (because it is not taken out on the server, the point is that you do not take it out next time will not be acquired, but will also stay on the server for a period of time).

Take it out. After you can set up a temporary staging area in the storage directory, it is good to design a process for regular cleanup.

No way. In the TMP can be lost at any time, and due to the issue of permissions, at that time without move_uploaded_file transfer will not necessarily be able to access.

If the file is not uploaded, it will be lost in a sudden.

No, the script's life cycle is over. tem files are lost at any time.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.