Re: WOFileUpload: checking against Windows filepath
Re: WOFileUpload: checking against Windows filepath
- Subject: Re: WOFileUpload: checking against Windows filepath
- From: Ute Hoffmann <email@hidden>
- Date: Sat, 24 Jul 2004 13:18:06 +0200
Hi,
I use this bit of code to check for windows and get the filename.
bildName = NSPathUtilities.lastPathComponent(aFileName);
if(bildName.indexOf("\\")!=-1){
int letzterPfadbestandteil = bildName.lastIndexOf("\\");
String nurBildName =
bildName.substring(letzterPfadbestandteil+1);
bildName = nurBildName;
}
Hope that helps,
Ute
Am Samstag, 24.07.04 um 03:24 Uhr schrieb Randall Perry:
> 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@hidden
> 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@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.