Hola, This is not Windows problem. Opera works fine under windows. its an IE problem. However, I solved the problem like this:
create a File object File f = new File( NSPathUtilities.lastPathComponent(theFileName)); // use java to get the name. this works for every browser. String fileName = f.getName(); HTH, Sako. ----- Original Message ----- From: "Dev WO" <[EMAIL PROTECTED]> To: "WebObjects Dev" <[email protected]>; "WebObjects Dev Dev" <[EMAIL PROTECTED]> Sent: Thursday, December 08, 2005 11:56 PM Subject: WOFileUpload: checking against Windows filepath > Hi all, > searching for solving an issue (I thought weren't be there) I found > this thread... > I'm using NSPathUtilities.lastPathComponent, but it appears I still > get the entire path!! like in the post below. > I'll ask my client tomorrow to check which version of IE was used. > But does anyone knows the fix? > > Thanks > > Xavier > > > > > on 7/23/04 11:47 PM, Hsu at [EMAIL PROTECTED] wrote: > > > >> NSPathUtilities is intended to work on both Mac(Unix) and Windows > >> paths... if it doesn't, it's a bug. > >> > >> What's the specific path in question? > >> > > > > // theFileName is the filePath property of the WOUpload component > > String fileName = NSPathUtilities.lastPathComponent(theFileName); > > > > NSLog.out.appendln( "theFileName = " + theFileName ); > > NSLog.out.appendln( "fileName = " + fileName ); > > > > > > > > Here's the debug output: > > theFileName = E:\tmp\shmeckle.zip > > fileName = E:\tmp\shmeckle.zip > > > >> Karl > >> > >> On Jul 23, 2004, at 6:24 PM, Randall Perry wrote: > >> > >>> On testing my file upload app on a Win2k machine I discovered > >>> that IE > >>> in > >>> Windows inserts the full path to the file in the browse field, > >>> whereas > >>> on > >>> the Mac only the filename appears. > >>> > >>> My code checks the filename to see if it begins with a customer > >>> code. > >>> I use > >>> NSPathUtilities.lastPathComponent(), but apparently it doesn't > >>> work on > >>> PC > >>> paths. > >>> > >>> Is there a method that does? > >>> > >>> -- > >>> Randall Perry > >>> sysTame > >>> > >>> Xserve Web Hosting/Co-location > >>> Website Design/Development > >>> WebObjects Hosting > >>> Mac Consulting/Sales > >>> > >>> http://www.systame.com/ > >>> _______________________________________________ > >>> webobjects-dev mailing list | [email protected] > >>> Help/Unsubscribe/Archives: > >>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev > >>> Do not post admin requests to the list. They will be ignored. > >>> > >>> > >> -- > >> > >> i am the man in the machine > >> l'homo ex machina > >> > >> Homepage: > >> http://homepage.mac.com/khsu/index.html > > > > -- > > Randall Perry > > sysTame > > > > Xserve Web Hosting/Co-location > > Website Design/Development > > WebObjects Hosting > > Mac Consulting/Sales > > > > http://www.systame.com/ > > _______________________________________________ > > webobjects-dev mailing list | [email protected] > > Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/ > > listinfo/webobjects-dev > > Do not post admin requests to the list. They will be ignored. > > > > > > _______________________________________________ > WebObjects-dev mailing list > [EMAIL PROTECTED] > http://www.omnigroup.com/mailman/listinfo/webobjects-dev > _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
