Forum Moderators: coopster

Message Too Old, No Replies

User photo uploading

         

JustJon

4:03 am on Aug 5, 2005 (gmt 0)

10+ Year Member



Heyas. I'm working on a website where some users will be able to upload photos to their account. Can anyone recommend some resources to read about good ways to store the photos on the server? Thanks.

dreamcatcher

8:03 am on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi JustJon,

Check out this thread and message 29:
[webmasterworld.com...]

dc

JustJon

8:49 pm on Aug 5, 2005 (gmt 0)

10+ Year Member



Thanks, that was helpful, but he's uploading all the images to teh same directory. I know that I allow users to each upload 10 pics each, it'll blow that directory up pretty quick.

Where could I learn about picture storage schemes?

dreamcatcher

9:01 pm on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want to create directories for users look into the mkdir() function. Note this will not work if your server is running in Safe Mode.

[uk.php.net...]

You would also want to add a count each time someone uploads an image so that you can restrict the amount of files a person can upload.

dc

topr8

9:08 pm on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i have several sites doing this kind of thing (although they are win/asp so i can't suggest any code) but for me the most important thing is running a script/component that checks the size(kb) of an image and compresses it if it's not within my paramaters.

you'd be amazed how many people upload 1 meg pictures that can easily be compressed to 50 kb

ergophobe

5:07 pm on Aug 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




you'd be amazed how many people upload 1 meg pictures that can easily be compressed to 50 kb

No I wouldn't actually - they send them to me via email all the time! I'm more surprised when someone actually takes the time to resize an image. Most people don't have a clue about file size and some people don't even know how to figure out how big the file is let alone make it smaller.

Jon, if you're going to have lots of users uploading 10 pics each, maybe you should look into one of the off-the-shelf galleries like Menalto Gallery or Coppermine. Many shared hosts do auto-installs of both of those.

JustJon

1:56 am on Aug 8, 2005 (gmt 0)

10+ Year Member



If you want to create directories for users look into the mkdir() function. Note this will not work if your server is running in Safe Mode.

[uk.php.net...]

You would also want to add a count each time someone uploads an image so that you can restrict the amount of files a person can upload.


I know how to create images and track user uploads. I'm asking about a directory schema for storage that won't tax my server.

Jon, if you're going to have lots of users uploading 10 pics each, maybe you should look into one of the off-the-shelf galleries like Menalto Gallery or Coppermine. Many shared hosts do auto-installs of both of those.

Thanks, I'll check those out.