A recent change to File (Field) Paths was to have files uploaded to the temporary file system instead of the desired file system prior to the file being processed, which not only helps with keeping the destination file system clean, but is extremely helpful for those using external file schemes like Amazon S3 as it prevents the unprocessed file being uploaded unnecessarily. #2383527: Force unprocessed uploads to temporary://

Unfortunately, this has caused an issue with FileField Sources Plupload:

When the Plupload source finished transferring the file it moves the temporary file to it's destination and then deletes the temporary file, however in this case the temporary file and the destined file is the same, so when it deletes the temporary file it is actually deleting the real file.

The solution is simple, and a patch will be incoming; Check that the temporary file is different to the real file before deleting it.

CommentFileSizeAuthor
#2 check_file-2564597-2.patch749 bytesdeciphered

Comments

Deciphered created an issue. See original summary.

deciphered’s picture

Status: Active » Needs review
StatusFileSize
new749 bytes
deciphered’s picture

Title: heck temporary file isn't destination file before deleting. » Check temporary file isn't destination file before deleting.
oschuetze’s picture

Works for me! Great Patch. Thx.

jordanmagnuson’s picture

Status: Needs review » Reviewed & tested by the community

Tested and running on my live site.