[ansel] Store images with extension?
Ben Chavet
ben at chavet.net
Tue Sep 7 13:19:12 PDT 2004
There is one problem with that: filename collisions.
The storage locations are calculated by a hash table to make copying & moving
images from gallery to gallery less work for the server. How would we handle
multiple files named image2.jpg? They would all end up in the same hash and
would have to be renamed anyway. Then, how would you tell which
image2.jpg you
are looking for unless you use the DB to figure it out? Seems like a vicious
cycle to me :)
It would work great if users would actually give images a meaningful name. But
who takes that kind of time? Especially when you can store hundreds of images
on a digital camera? I personally dump the images off of my camera directly
into ansel using the XP upload feature. Then I rotate and rearrange as
necessary.
--Ben
Quoting "Heath S. Hendrickson" <heath at outerspaceconsultants.com>:
> I often wondered initially why the file names were changed to random
> names. I think it was due to some of the legacy code that Ansel started
> from (Chuck will correct me if I'm wrong here), but it also got around
> the penchant of windows users to use illegal (for *nix, anyway)
> characters (!, $, ?).
>
> On a related note, would it be that difficult to store the files with
> the original names after passing it through a sanitization filter
> (depending on what host OS Ansel was running under)? This way a backup
> of the Ansel image directory is directly useable instead of having to
> use the DB to figure out what file was what. I know that the orginal
> filename is stored in the DB and presented when the image is
> viewed/downloaded, but I'm just thinking about it from a lower level.
>
> heath
>
> Jan Schneider wrote:
>
>> What do you think about storing the images in the VFS backend with an
>> extension matching the actual image format?
>>
>> This would fulfill two purposes: If you change the default image format in
>> the configuration, thumbnail images would be regenerated automatically. And
>> if you use the Alias feature to display the images directly out of the VFS
>> backend, they have the correct extension and you could use them outside of
>> <img> tags, plus the webserver sends the correct Content-Type.
>>
>> Jan.
>>
>>
>
> --
> ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: ansel-unsubscribe at lists.horde.org
>
>
More information about the ansel
mailing list