Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
file system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2007 at 23:41 UTC
Updated:
3 Feb 2009 at 02:00 UTC
In certain situations, it would be nice if files can be overwritten rather than have an additional file created with an incremental version number at the end of the filename. For example, when using IMCE, it would be nice not to force people to delete a file before uploading in order to avoid the incremented (in this case "_0") file name ending.
This patch adds a simple boolean parameter ($overwrite = FALSE) to file_create_filename().
| Comment | File | Size | Author |
|---|---|---|---|
| file.inc-overwrite.patch | 810 bytes | pcorbett |
Comments
Comment #1
drummAPI changes are currently being considered for Drupal 7.x.
This should follow the existing API conventions for a $replace parameter, such as file_move() uses.
Comment #2
pcorbett commentedWould you like me to adjust this to follow conventions in file_move()?
Comment #3
dopry commentedThe file_destination function provides this functionality now.