Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

upl.ContentType for Sa-Fileup not working

Status
Not open for further replies.

gavray

Programmer
Jul 17, 2000
65
GB
Hi please help me!,

I have been using upl.ContentType successfully for around 3 months on my site with no probs. I use it to get the mime type of the file which must be .mp3

For some unknown reason it's suddenly decided not to recognise .mp3 files and seems to think the files are octet/binary-stream files. I have not changed the code at all now suddenly it's not working. Could it be the browser I use IE 5.5 though that's what I used before.

I can't why it's suddenly turned - for no reason.

This is the code :

strPath=Server.Mappath ("/Upload")

(upl.UserFilename, "\") + 1)


FCONT = upl.ContentType
'response.write FCONT

FCONT2=LCase(FCONT)

If FCONT2 = "audio/mpeg" OR FCONT2 ="audio/mp3" OR FCONT2="audio/x-mpg" OR FCONT2="audio/x-mp3" OR FCONT2="audio/x-mpeg" Then

psuedo code SAVE FILE


Else

THIS IS NOT AN MP3 file

End if the boho from soho
 
Best guess is that it could be a service pack or other install to the OS that happened on the server. Sometimes the security updates that MS puts out can have funny effects on a web page that is using file level info. The money's gone, the brain is shot.....but the liquor we still got.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top