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.

CommentFileSizeAuthor
#1 remove-temporary-file-2065871-1.patch978 bytesstBorchert
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stBorchert’s picture

Status: Active » Needs review
FileSize
978 bytes

Attached patch removes the file from temp directory and the database entry so the file can be uploaded again.

R.Hendel’s picture

Status: Needs review » Reviewed & tested by the community

Thanks 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.

aaron’s picture

Dave Reid’s picture

Status: Reviewed & tested by the community » Fixed

I 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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.