473,509 Members | 2,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET Upload with Macintosh???

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?
Nov 18 '05 #1
3 891
> 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
Nov 18 '05 #2
you are correct, unix uses forward slashes.

-- bruce (sqlwork.com)
"Bryan Fleming" <br***********@hotmail.com> wrote in message
news:5c**************************@posting.google.c om...
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?

Nov 18 '05 #3
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.

"Bryan Fleming" <br***********@hotmail.com> wrote in message
news:5c**************************@posting.google.c om...
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?

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11737
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
8
11902
by: Charles \Stretch\ Ledford | last post by:
Greetings, all. I'm trying to access a web page on my Macintosh, running OS-X. Using both IE and Safari browsers, I get the following message: "The Java Virtual Machine (JVM) installed on...
3
1729
by: Roger Withnell | last post by:
My NavBar works with IBM/IE5.5 but does not work properly with Macintosh/IE5. The on page vertical NavBar has a button in each <td> The buttons are separated with a style="top:XXpx" in the td...
8
1452
by: KwiGibo | last post by:
Hi Everyone, I've been approached to develop an application that will run on Windows as well as Apple Macintosh platforms. Being primarily a C/C++ programmer I would prefer to use this language....
8
1855
by: Bob Skutnick | last post by:
Greetings, I'm hoping someone has experienced a problem I'm having: I have an existing ASP application (working fine) that uses an SSL server certificate. My user community is made up of both...
2
1812
by: Max Metral | last post by:
I get sporadic viewstate errors from Macintosh browsers. I get mailed the form values when this happens, and it appears that the problem is the encoding of the POST value from the browser. ...
0
1211
by: microcosmos | last post by:
We have developed a web-based "intranet" application using ASP.NET, C# and SQL Server 2000, session management with State Server. This application will not be used on internet, just an intranet...
4
2435
by: John DeSoi | last post by:
The first public beta for pgEdit is now available (see product description below). If you would like to participate in the beta program, evaluate the software and send some feedback to me (e.g....
9
1978
by: dreamamit2001 | last post by:
Hi, I am new user to ASP.NET2.0? I would like to know can Macintosh users able to access ASP.NET 2.0 site ? I also want to know what are the features of ASP.NET2.0 which are not supported for...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.