Jump to content


Photo

file uploads(specs)


  • Please log in to reply
3 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 02 August 2006 - 12:57 PM

I don't think I will have any technical related questions dealing with fileuploads after I finished that file management system, but I have encountered a spec's issue now.  I am getting picture uploads from people, and I am going to dynamically display them WITH there specific post.  I am going to have them uploaded, and deleted when the post run's out of time.  Now the thing I am wondering, I am not use to getting an upload to redisplay it later as an image, in a controlled location.  Normally the images were shown on there own page, that wasn't part of the layout with a plain white background, this time they are put within a layout, in a controlled enviroment.  Should I just have the display area, have a limit on width and height.  I can't just say "Hey you have to limit the size of your pictures."
So if I just put
<img src="<?php echo $dynamicpiclink; ?>" width="number" height="number" />
I would have to figure a standard size that wouldn't take up too much room, and wouldn't make the pictures look shitty either.  Any idea for a standard widthXheight I could go with for all the pictures displayed.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 02 August 2006 - 01:41 PM

Why dont you use GD to resize the image/restrict image size and then upload to DB? Keeps verything in 1 place and nice and tidy?

Regards
Liam
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 02 August 2006 - 02:23 PM

I haven't even thought about external extension libraries, I am a little pissed at those.  I know everything almost about basic core php language.  But then I tried just getting my hands a little wet with a random external library, in this case it ended up being mcrypt, and It made me so mad, I almost broke the computer.  I had 8 lines of code, all the mcrypt encrypt library, and It was encrypted in a way I couldnt' even decrypt it, even when I had the key, because it recreated a new key,e ven for the same thing everytime the browser was refreshed, I have wanted to get into curl, but I am afraid of the libraries a little now, because of the difficulty I had with mcrypt.
See with images, I can already easily restrict filesize, or extension, I could also do some other stuff.  EXCEPT for doing standard validations on images, or files.  OR whatever else, and I will just use width= and height= for the img display, but what else can gd do.  Is it the library that completely can create images from scratch and everything, and have you ever played with the ming library, I may try playing with all of those later on, some of those are powerful as hell.  I want to master the mcrypt library but I got too annoyed with it for a time period.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 02 August 2006 - 06:49 PM

GD is a very well know and supported library
www.php.net/gd Can do things from checking dimentions to creating images adding watermarking and everything


I dont think i even had to install GD it was already installed with Debian when i installed it.

Liam
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users