Opened 13 years ago
Last modified 8 years ago
#7979 closed Feature request
upload to temporary name to avoid script errors — at Initial Version
Reported by: | tutils | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | FileZilla Client |
Keywords: | Cc: | ||
Component version: | Operating system type: | ||
Operating system version: |
Description
Many sites use PHP or other scripting languages. Those scripts cannot be accessed by visitors of the site until they are fully uploaded to the server. During upload and until they are fully uploaded, they produce a 500 internal server error message (or white page, depending on the server configuration).
This is especially relevant when uploading and overwriting a large PHP file on the server, for example "functions.php", which disables the entire site during the upload, and can lead to unexpected results and even lost data in certain cases, for example when a visitor just submits a form.
My suggestion is to upload the file using a temporary name (instead of overwriting), and when the upload completes, rename back to the original name. On linux renaming over an existing FTP file is possible, but on Windows (or SFTP) it is not. So if the renaming fails, it should delete the original file, and then rename again. The downtime would still be much faster than with normal overwriting of the file.