[ic] howto do if file exists

Steve interchange-users@icdevgroup.org
Fri Apr 18 17:44:00 2003


>>>>>>>>>>>>>>>>>>
> Of course, benchmarking would be required to *really* know how it compares
> (if anyone wants to build the same system twice, just with different
> filesystems).
Snip...

Aha, there is one. I think ReiserFS is a default option for Linux
"mkfs", so that would be viable.

Still in all, it might be nice to have some management for images in IC.
I was thinking of:

    1. Images table in database.

    2. The image tag checks for file, if not gives URL to IC-based page
       that pulls image from table and writes to file system.

    3. Optional entry to map image to hashed directory.

    4. External check script (just DBI) which removes directory and
       rewrites all images in hashed directories based on some algorithm
       -- and saves results appropriately in products table.

    5. The reverse script which pulls in an image directory to the
       table; must have "items" and "thumb" directory to read which are
       product images and which are regular images.

    6. Auto thumbnail generation.

    7. Change image upload to go to image table instead of to file
       system.

It would probably take me about a day to get it mostly done; but it
would take 4 or 5 more days to document and refine and test. It would be
too much of a support hassle for the list with the amount of time I can
afford to spend on it, so I probably shouldn't do it. 8-}

--
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>
<<<<<<<<<<<<<<

This sounds like it might be a good idea if it is fairly simple to
implement.
We currently have about 2000 items in our database, and the images are in
the standard locations as defined in the foundation example. We will
probably have about 5-10 thousand image files in each directory for image,
thumb, and large when we get done adding everything. Performance is ok now,
but I guess it will degrade over time.

-Steve