eMonk Posted November 5, 2008 Share Posted November 5, 2008 i only want image uploads & the following code is loading all files *.* when you click on the browse button in my form <input type="file" name="file1" accept="image/gif, image/jpeg"> any ideas? Quote Link to comment Share on other sites More sharing options...
trq Posted November 5, 2008 Share Posted November 5, 2008 The accept attribute isn't supported by most browsers. You will need to simply validate your data server side. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 6, 2008 Share Posted November 6, 2008 NEVER entrust anything that controls user input that is used on the client side - ALWAYS validate server side (thats not to say you can't enhance the process - esp ajax - with javascript). Quote Link to comment Share on other sites More sharing options...
eMonk Posted November 6, 2008 Author Share Posted November 6, 2008 ok, i will try to validate these files server side with php. i will post in the php section if i have trouble with the code. thx for the replies! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.