.NET Upload with Macintosh???

B

Bryan Fleming

Hello,

I wrote a page that uploads a file VIA http with no problems at all.
My clients are using Macs and wouldn't you know it, the site won't
upload for them. Anyone seen a work-around for this????


Here's a sample of the code:


lstrFileName = FileUploader.PostedFile.FileName

If lstrFileName <> "" Then

lintBackSlashes = lstrFileName.LastIndexOf("\")

lstrFileName = lstrFileName.Substring(lintBackSlashes)

lstrUploadFolder = Server.MapPath("uploads") & "\" &
Session("userID")

FileUploader.PostedFile.SaveAs(lstrUploadFolder &
lstrFileName)

Could it be that the mac file does not have any \ slashes?
 
D

darrel

Could it be that the mac file does not have any \ slashes?

Could be. I believe OSX uses colons to separate directories. (I *think* it's
colons, someone else will have to confirm though)

-Darrel
 
K

Kevin Spencer

Try using the methods of System.IO.Path to get your file names and paths.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

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

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top