开发者

automate picture uploads into <div>

I want to implement a function into my website.... On the main page of my site, I have a photo gallery identified by div id="gallery and each picture is broken up between li breaks... each image is 100x开发者_如何学C100 pixels also. I was wondering if it is possible to enable anyone to upload a picture and have it automatically resized to 100x100 pixels, and inserted between line breaks and into the div, gallery. Does anyone know how to go about doing this, or if there is already a script out there?

Thanks in advance!


In pseudocode

  • have an upload form
  • on upload complete and submit.. store image on your server and run http://php.net/manual/en/book.imagick.php to resize the image
  • store location of the image within a table on a database
  • on complete of the resize and insertion into the db script return the location of the file in json or some like format
  • on the complete: event grab the response and create a new dom element in the list with the img tag within it

hope this helps.

ps are you The Todd??!!

automate picture uploads into <div>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜