Our default storage class for file and image libraries should automatically determine the file name name by hashing the file content. This will:
1) De-duplicate uploads
2) Allow us to serve all files (not only static media) with far-future expiry (100 years)
We should store the original file name in a field on the model, so we can set it on response headers so that direct downloads will be saved locally with the original filename. This means we can also have multiple distinct files for download with the same file name metadata.
The admin change list should show and search the original filename.
This behaviour is already implemented in an ixc-whitenoise mixin, and commented out in ICEkit's default storage class:
Our default storage class for file and image libraries should automatically determine the file name name by hashing the file content. This will:
1) De-duplicate uploads 2) Allow us to serve all files (not only static media) with far-future expiry (100 years)
We should store the original file name in a field on the model, so we can set it on response headers so that direct downloads will be saved locally with the original filename. This means we can also have multiple distinct files for download with the same file name metadata.
The admin change list should show and search the original filename.
This behaviour is already implemented in an
ixc-whitenoise
mixin, and commented out in ICEkit's default storage class:We just need to: