Hmm..
You gave me a lot to think about, and a whole lot of
work to do. I definately love your idea and logic, and
yes, it would make everyone happy.
well i guess by the time i figure the coding and
process out, i'll keep in mind to arrange for your
British Airways Gift Certificate too.
Glory!
T. Edison jr.
--- Miguel Cruz <[EMAIL PROTECTED]> wrote:
> On Sat, 11 May 2002, Thomas Edison Jr. wrote:
> > If i have a filename "room.jpg" in my Upload
> > Directory, and someone else comes and uploads a
> file
> > by the same name, the previous "room.jpg" is
> > overwritten by the new one. Any suggestions?
>
> In the long run, I think the best plan is to name
> your files after the
> unique database ID.
>
> Store the names ('room.jpg') in the database.
>
> If you expect getting more than a thousand files or
> so, split them into
> directories. If you use a numeric key, just take the
> last digit or two and
> use that for the directory (for instance, '4745'
> would go in '5/4745').
>
> Then write a simple readfile script to process
> downloads (see today's
> thread about protecting downloads).
>
> You can look in the database and construct URLs
> like:
>
> <img src="image.php/4745/room.jpg">
>
> and your download script can look at the number to
> figure out which
> directory it's in, and look at the file name to
> figure out the mime type
> to send. The browser's happy because it thinks it's
> getting a file called
> room.jpg no matter how many of them you have, the
> server is happy because
> the files are spread nicely across a few
> directories, you're happy because
> you got your work done, and I'm happy because you
> sent me a British
> Airways gift certificate out in gratitude.
>
> miguel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php