-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Gerhard
Killesreiter
Sent: Tuesday, July 22, 2003 4:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [drupal-devel] image file names
On Tue, 22 Jul 2003, Bruno Rocci wrote:
Hi Bruno!
> > Seems to be a bit of overkill.
> > What I could do is to update the filename after saving (and thus
> > knowing the node id) by implementing the insert hook.
> >
> > *ouch* closer inspections reveals that this already the case.
> > So I will implement the $node->nid idea.
>
> I saw that you have updated image.module. I'm sorry, but I still don't
> understand why you made this change (maybe the heat affects my brain ;-)
As long as it does not get dry... ;)
> On my configuration, with 1.51 version of image.module, if I use the
'create
> image' link to upload two different files with the same name, say
test1.jpg,
> the filenames generated by the module are different (say
> img_5d91312f638b1913b186c0c76df66a6a and
> img_7d6044e95a16761171b130dcb476a43e).
Yes. I did not like this.
1) The file extension is missing.
2) people will get confused. They'll think something is broken if their
image gets renamed beyond recognition.
> While I'm writing this, I wonder if I'm not getting a different
> behavior of image.module on my test configuration (which is a WAMP
> system) from yours which I suppose is a LAMP... The image filename
Yes, I work on Linux, but this should not be an issue.
> above look like a temporary filename using a md5... Mmmh, I should
> have a look at the code...
No longer neccessary: If you now upload a file bruno.jpg it will get
renamed to img_bruno-xy.jpg, where xy is the node id. Since the node id
is unique we do not need to worry about md5 any longer.
We could discuss omitting the img_ part.
Cheers,
Gerhard
--
[ Drupal development list | http://list.drupal.org/ ]
[ http://lists.drupal.org/options/drupal-devel/jsloan%40enkapsis.com ]