Jump to content

Archived

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

Ninjakreborn

file uploads(specs)

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
GD is a very well know and supported library
[url=http://www.php.net/gd]www.php.net/gd[/url] 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

Share this post


Link to post
Share on other sites

×

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.