Loading....
Recent Article links:

Article

Atomic FTP uploads.

Amidst doing a lot of updates to the backend script and hence a lot of uploads of files, I constantly received messages from members about errors. These errors are due to you guys loading a page with a half uploaded PHP script. And since PHP is stupid, it’ll parse the file and try and execute it anyway. So to improve the user experience whilst we’re performing maintenance and to alleviate time wasted looking at errors that auto fixes itself once the file is uploaded, I wanted/wished a way to atomically upload a file.

So I searched through the documentation of Proftpd and found a nifty option that is turned off by default (do you think Proftpd devs will allow me to use the word stupid here?). This option basically allows me to upload files to a tmp directory and then moves the file to where I intend to upload the file to, providing an atomic like upload experience.

ACF loading animated gif