You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if two files are uploaded at the same time, they could both have the same name. This would result in an error, though exactly what the error behaviour would be is undetermined.
We should add a read lock in File::onBeforeWrite() to avoid other processes creating files with the same name before this process has a chance to persist in the database.
GuySartorelli
changed the title
TODO: Add read lock to avoid other processes creating files in File::onBeforeWrite()
Don't allow concurrent processes to try creating files with the same name
Oct 24, 2023
Description
Currently if two files are uploaded at the same time, they could both have the same name. This would result in an error, though exactly what the error behaviour would be is undetermined.
We should add a read lock in
File::onBeforeWrite()
to avoid other processes creating files with the same name before this process has a chance to persist in the database.See:
silverstripe-assets/src/File.php
Line 714 in 27000f1
The text was updated successfully, but these errors were encountered: