Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you upload a file within the media browser and moving the file to its final destination fails for whatever reason it is not possible to upload the same file again since the file uri (temporary://...) already exists in table file_managed.
Patch will follow.
Comment | File | Size | Author |
---|---|---|---|
#1 | remove-temporary-file-2065871-1.patch | 978 bytes | stBorchert |
Comments
Comment #1
stBorchertAttached patch removes the file from temp directory and the database entry so the file can be uploaded again.
Comment #2
R.Hendel CreditAttribution: R.Hendel commentedThanks a lot, @stBorchert!
We've applied the patch on the production site which on which we've detected those errors and our customer confirmed us, that everything seems to work fine now. They can publish those galleries now which have been faulty before.
Comment #3
aaron CreditAttribution: aaron commented#1: remove-temporary-file-2065871-1.patch queued for re-testing.
Comment #4
Dave ReidI committed the patch without the watchdog() call because file_move() already does that for us if it fails.
http://drupalcode.org/project/media.git/commit/615829d