Skip to content

v0.5.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@lupinitylabs lupinitylabs released this 15 Sep 15:57
a66d311

This release introduces breaking changes. Please review carefully before upgrading.

Previously, Lodor would only clean up file chunks automatically. Now, it takes care of cleaning up all files created during an upload, including the upload itself.

If auto_cleanup is set to true and no FileUploaded event listeners are registered, this will lead to immediate cleanup of all files including the final upload itself directly after the upload finishes. To prevent that in a default installation, the default setting for auto_cleanup is now false.
This behavior will only intermediately occur in the 0.5.x release and is due to the upload logic that aimed for moving around files as little as possible. The upcoming 0.6.x release will perform all uploads and merge actions on a temporary disk and then move the finished files over to a permanent upload disk, which will make the handling and cleanup more concise.

Also, the prototype of the cleanupUpload() and removeUploadFiles() methods have changed. The second parameter previously determined whether files associated with a chunked or single upload should be deleted. The new behavior is that both chunked and single uploads are deleted if found, as long as the auto_cleanup and auto_cleanup_chunks configs are true. The obsolete second parameter is now replaced by a force delete that deletes both chunked and non-chunked files regardless of the config settings. This is intended for cleanup of broken uploads.

If you manually called any of these methods, make sure you change your code accordingly.