All Django's builtin storages do not overwrite files by default -- they append a number when there's collision.
I've been using S3Boto3Storage for quite some time, and suddenly found that many of my files were mixed up -- models seems to have a reference to the wrong on-disk file. After some research, it turns out this particular storage overwrites files by default.
This is very undesirable behaviour -- it's the opposite of the default used by Django, and can (and has) easily result in data loss.
Issues with the current default:
It's the opposite of what Django does.
It's a "delete user data by default", which is as bad as it sounds.
It's too easy to screw up, since there's no clue that this storage behaves differently -- as I said, I only found out after researching some data loss.
All Django's builtin storages do not overwrite files by default -- they append a number when there's collision.
I've been using
S3Boto3Storage
for quite some time, and suddenly found that many of my files were mixed up -- models seems to have a reference to the wrong on-disk file. After some research, it turns out this particular storage overwrites files by default.This is very undesirable behaviour -- it's the opposite of the default used by Django, and can (and has) easily result in data loss.
Issues with the current default: