Safari browser errs on file upload

B

Boris Twila

hi Only the Safari browser gives an err when uploading a file:


on this line> If fileFld.ContentType.IndexOf("image") >= 0 Then

any idea why??? Se the function below

thanks





fileFld = Request.Files(0) ' get the first file uploaded from the form
(note:- you can use this to itterate through more than one image)

'fileFld = Request.Files("ctl00$FormView1$FileUpload1")

If fileFld.ContentLength > upload_max_size * 1024 Then

msg = "Sorry, image 1 must be less than " & upload_max_size & "Kb<br />"

Else

fileExt = System.IO.Path.GetExtension(fileFld.FileName).ToLower()

If fileFld.ContentType.IndexOf("image") >= 0 Then

Request.Files(0).SaveAs(Server.MapPath(upload_dir) & AdNum & "__1" &
fileExt)



HasImages += 1

End If

End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top