php how to test if file has been uploaded completely

后端 未结 11 1753
耶瑟儿~
耶瑟儿~ 2021-02-01 15:24

Is there any way to check if file has been uploaded completely on the server? My scenario: User uploads file over ftp and my other PHP task is running in cronjob. Now I would li

11条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-01 16:30

    If you have control over the application doing the upload, you can require that it upload the file to name.tmp, and when it's done uploading rename it to name.final. Your PHP script could look only for *.final names.

提交回复
热议问题