Jesper Posted August 10, 2008 Share Posted August 10, 2008 For some reason, when I'm uploading a zip file to my site, for some of them the check for file type ($_FILES['effect_download']['type'] sais that it isn't "application/zip". Has anyone ever had this problem or knows how to fix it? Quote Link to comment https://forums.phpfreaks.com/topic/119069-solved-file-type-applicationzip/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 10, 2008 Share Posted August 10, 2008 When something does not match what your code is expecting, echo out what it actually is. My guess is that the uploads that don't work are exceeding one of the upload size settings and an upload error is being generated but your code is not checking for errors. Quote Link to comment https://forums.phpfreaks.com/topic/119069-solved-file-type-applicationzip/#findComment-613127 Share on other sites More sharing options...
cooldude832 Posted August 10, 2008 Share Posted August 10, 2008 type print_r($_FILES); and see what you get when u upload something that fails. just because its example.zip doesn't mean its an application/zip Quote Link to comment https://forums.phpfreaks.com/topic/119069-solved-file-type-applicationzip/#findComment-613132 Share on other sites More sharing options...
corbin Posted August 11, 2008 Share Posted August 11, 2008 type print_r($_FILES); and see what you get when u upload something that fails. just because its example.zip doesn't mean its an application/zip And just because it's application/zip doesn't mean it's .zip. Don't trust mime-types. Quote Link to comment https://forums.phpfreaks.com/topic/119069-solved-file-type-applicationzip/#findComment-613226 Share on other sites More sharing options...
Jesper Posted August 12, 2008 Author Share Posted August 12, 2008 I just showed [name] for file type... Strange. Anyways, thanks for your help. I won't use this way of getting the file type anymore . Quote Link to comment https://forums.phpfreaks.com/topic/119069-solved-file-type-applicationzip/#findComment-614385 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.