Upload File Replace (for filefield CCK)
#D7CX : I pledge that Upload File Replace will have a full Drupal 7 release on the day that Drupal 7 is released.
This module is a small tool that allows uploaded files to retain their original name on upload.
REQUIREMENTS
Drupal 6.x requires the filefield CCK. (http://drupal.org/project/filefield)
Drupal 7.x no known requirements.
What it does
Default Drupal Behavior
<newest>-------------------------------<older>-------------------------------<oldest>
mydoc_3.doc ------ mydoc_2.doc ------ mydoc_1.doc ------ mydoc_0.doc ------ mydoc.docBehavior with this module
<newest>-------------------------------<older>-------------------------------<oldest>
mydoc.doc ------ mydoc_3.doc ------ mydoc_2.doc ------ mydoc_1.doc ------ mydoc_0.docThe problem with drupal is if you have a file called "mydoc.doc" upload it to a node, then make changes to "mydoc.doc" and upload the newer version, the newer version will be renamed to "mydoc_0.doc" because at the time of upload the old file was blocking the desired path name.
This module solves that problem by swapping the names of the older and newer file so that the newly uploaded file will retain its original name.
This also works with node revisioning as well. When you revert a revision, the file names are swapped so the newest revision has the original filename.
After swapping revisions, the numbering may no longer hold any meaning, IE mydoc_0.doc may not be the oldest. But mydoc.doc will always be the most recent.
Known Issues for High Traffic Sites
This module modifies the files and those files may have been cached by modules such as 'imagecache' or Drupal's page cache, so this module clears the page cache, imagecache, and image_field cache when needed. This may have some performance side effects if your site has lots of visitors and lots of files being uploaded.
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.1 | 2009-Oct-29 | 8.8 KB | Download · Release notes | Recommended for 6.x | |
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 7.x-1.x-dev | 2009-Oct-30 | 8.16 KB | Download · Release notes | Development snapshot | |
