473,473 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do i check the an image before uploading

28 New Member
Hai frnds.....

Please Help me. I want to validate an image befor uploading, to check whether it is a valid image or not
Jan 13 '07 #1
3 1627
treecool
6 New Member
there is many way..
the way that i usually used is comparing the extension of the file.
with " substr " command --> see PHP manual for the rest.
Jan 14 '07 #2
bsprogs
6 New Member
One thing I did with my uploader script was to upload the image to a defined hidden located on the server and submit the information on the file to a query table in my database.
Then when I log in, the images will appear on my screen in order of their upload and I can verify them that way.

So,

File is uploaded
File is placed in "uploads/queue/" folder.
File Information is placed in my "queue" table.

When I verify the image
File is moved from "uploads/queue" to "uploads"
File information in database is moved from "queue" table to "files" table.

Hope that helps give you an idea where to start.
Jan 15 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
Hai frnds.....

Please Help me. I want to validate an image befor uploading, to check whether it is a valid image or not
What do you mean by valid? Just that it is an image? Or do you want to accept only certain types of images, e.g. only .gif, .jpg, .png, .bmp, etc.? Or do you want to limit the file size? Or do you want to limit the image dimensions?
Jan 15 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: ok | last post by:
Hello, Q: How do I get image width and height before uploading an image? This because, I want to restrict people uploading huge files. Thanks in advance
2
by: Faree | last post by:
Hi, I am a PHP Developer.can any one help me on image upload and display of that image.what i want is uploading an image to a directory ,displaying of that image as a thumbnail.when i...
10
by: John Smith | last post by:
I know that uploading an image to a database has been covered, oh, about 3 trillion times. However, I haven't found anything covering uploading to a MySQL database with .net. Please don't...
2
by: Geoff | last post by:
Hi Previously I was able to check for an uploaded file to be a jpg or a gif by using the exif_imagetype() function. I had to change from hosting provider and the new one doesn't want to...
1
by: syam | last post by:
How do i check whether the an image and the path given by the user are valid before uploading the image using php.
3
by: Chris Mahoney | last post by:
Hi I'm setting up a site where users will be able to upload photos. I'd like to be able to ensure that they're uploading JPEGs, and not malicious code. I've tried checking the MIME type, but...
10
by: mishrarajesh44 | last post by:
hii all, I am facing a problem currently.. i have a script for image uploading and resizing.. the image uploading takes place properly for every size images.. but, the resizing works for...
5
by: hsegoy1979 | last post by:
Dear All I have to create an application to do virus check before uploading an image. Any Help Yogesh
8
by: brahmaforces | last post by:
Hi Folks, I am using cherrypy and python. I am trying to get a user profile image to resize on the client side before uploading to the server. PHP has a gd library that does it it seems. Has...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.