Closed (won't fix)
Project:
Upload element
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Nov 2008 at 11:48 UTC
Updated:
27 Sep 2009 at 12:19 UTC
It would be convenient than the name of the directory also have the opportunity to set an arbitrary file name. for example, if a book is that the name was: AuthorName - BookTitle.ext
Comments
Comment #1
alan d. commentedI'm going to set this as postponed, but will look at reopening it if there is enough demand.
A possible way of extending the function would be: (using the basic example of $node->image)
This would rename to node-123.ext, node-123-1.ext, node-123-2.ext, etc due to FILE_EXISTS_RENAME.
This makes an extra file_copy, but it is probably the easiest method to implement. I haven't run the code, so some debugging may be required.
Comment #2
ipto commentedI will register a new account and request to ask again and again:)
Comment #3
ipto commentedWill the code includes providing an opportunity to specify a file name based on the fields of node the final version, and if so, when can this wait?
Comment #4
alan d. commentedHi Ipto
@see http://drupal.org/node/368002#comment-1235482 for a possible working example.
This should enable you to rename it to anything you like (you may want to pass in the $node if you need this info)
Still not convinced that this is a good feature for general use, especially as this can be one so easily by calling a custom function like the one above.
Comment #5
ipto commentedOk, thank you
Comment #6
alan d. commentedMarking closed as I have stopped development with the introduction of the effectively the same element in Drupal 7, (managed_file in the core File module).