Jump to content

Multiple file uploader (whole directory)


arbitter

Recommended Posts

This has probably been asked here tons of times, and yes I've searched on google but I can't find a decently explained method.

 

What I want is to be able to upload a whole directory of pictures at once. These pictures must go through the following:

  • Be cropped in size (about 600px width/height)
  • This must be stored in a folder under a random name
  • A thumbnail must be made, with the same name, in another folder
  • The location of each picture should be stored in a database

 

What I've said here is all PHP I presume, and that I can take care of, I think.

 

The problem is the multiuploader. I understand it can't be done in PHP, since PHP lets only 1 file per input tag, so you cannot select a directory. So this should be done with javascript/java/???

 

 

Additional questions:

  • if I do mkdir('/pictures/$mapname/thumbs');, the 'pictures' already exists but the rest doesn't. Does it create the $mapname dir and the thumbs, or should I use 2 different mkdir's?
  • What width is best to save the images to?
  • What with is the best to save the thumbs to?
  • So many more, but I'll keep it at this!

 

I know it's a lot of questions, but it would really be handy if I could do this!

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/221389-multiple-file-uploader-whole-directory/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.