blatant3 Posted March 2, 2010 Share Posted March 2, 2010 I have an upload script which echos the $_FILES['file']['type'] to the screen. When I try to upload an mp3 file I get application/x-unknown. Does anyone know why that would happen? Quote Link to comment https://forums.phpfreaks.com/topic/193900-mp3-file-is-showing-as-applicationx-unknown/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 2, 2010 Share Posted March 2, 2010 The browser could not figure out what the file was either because of the browser or because of the file. If this occurred for a known good file, you will need to allow for that value for the ['type'] in your validation logic. Quote Link to comment https://forums.phpfreaks.com/topic/193900-mp3-file-is-showing-as-applicationx-unknown/#findComment-1020447 Share on other sites More sharing options...
inversesoft123 Posted March 2, 2010 Share Posted March 2, 2010 have you posted form with multipart/form-data ????? Quote Link to comment https://forums.phpfreaks.com/topic/193900-mp3-file-is-showing-as-applicationx-unknown/#findComment-1020503 Share on other sites More sharing options...
PFMaBiSmAd Posted March 2, 2010 Share Posted March 2, 2010 The whole $_FILES array would be empty if the form does not have the correct enctype. Quote Link to comment https://forums.phpfreaks.com/topic/193900-mp3-file-is-showing-as-applicationx-unknown/#findComment-1020537 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.