Reuse existing files as previews, icons or featured images #161
No reviewers
Labels
No Label
Priority
Critical
Priority
High
Priority
Low
Priority
Normal
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Type
Breaking
Type
Documentation
Type
Enhancement
Type
Feature
Type
Report
Type
Security
Type
Suggestion
Type
Testing
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/extensions-website#161
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "files-allow-reuse-between-ext"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently duplicate uploads cause a validation error, which is very annoying in both Draft and Edit flow.
A better way to handle duplicates would be to just reuse existing records of files matching them by the hash.
It will be possible to:
If all extensions referencing the file in any way are deleted, the file remains in the database: no thumbnail generating or scanning will happen if/when the file gets re-uploaded as a preview or featured image.
We could choose to implement some kind of clean up later, if this becomes a problem.
In all cases of re-upload
File.user
will not change: this shouldn't be a problem because currently there's no code relying on image ownership.Version files will remain the only exception from this changed behaviour: it will only be possible to re-upload a version file once the version itself is deleted (which also deletes its file).
As a consequence of this change
File.extension_id
is dropped, because it is no longer possible to choose which extension should be saved there.Should take care of #157
WIP: Reuse existing files as previews, icons or featured imagesto Reuse existing files as previews, icons or featured images