Jump to content

[SCRIPTING] Upload a PNG


SiteSniffer

Recommended Posts

I can't seem to fin the error in this and I was hoping you all could take a quick peek at it. I'm making an upload script that makes you able to upload images to a server. Jpg and Gif work fine, PNG gets me an invalid. Here's the snippet:

if (($_FILES["file"]["type"] == "image/gif")	|| ($_FILES["file"]["type"] == "image/png")	|| ($_FILES["file"]["type"] == "image/jpeg")	|| ($_FILES["file"]["type"] == "image/pjpeg")	&& ($_FILES["file"]["size"] < 20000))  {

I am 100% sure that the png files I tried to upload are valid png files (photoshop -> save for webdevices etc etc) so that's not it, the error is somewhere in the code (above) I think. Anyone got a clue what I'm doing wrong?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...