“Replace the file, use new file name” leaves the old file in uploads filder
-
Suppose I have
foo.pdf
in my media library.When I use this plugin (v 3.5.0) to replace it with
bar.pdf
(by selectingReplace the file, use new file name and update all links
in theReplacement Options
section), the file does get replaced in theMedia > Library
screen and all existing links to the old file are replaced with links to the new file.However, if I look in the
uploads
folder,foo.pdf
is still there (all the old thumbnails get deleted, but the “main” file doesn’t).Besides needlessly taking up disk space, this is a problem if I subsequently decide that I want the old file back in my media library and I replace
bar.pdf
withfoo.pdf
(by selectingReplace the file, use new file name and update all links
in theReplacement Options
section). In that case, because of core appending-1
,-2
, etc to the basename of uploaded files I end up with a URL of the formhttps://domain/wp-content/uploads/{date}/foo-1.pdf
.While that’s not a major problem, but I’m wondering if there is a specific reason you only delete the thumbnails and not the original file in this case. Is that a bug, or was it a “design decision”?
- The topic ‘“Replace the file, use new file name” leaves the old file in uploads filder’ is closed to new replies.