by Brian Hitney
2. September 2004 09:17
It's pretty easy in ASP.NET to build a form that supports the posting of binary data through the HtmlInputFile control. This wasn't so easy in classic ASP.
I just stumbled on a browser difference that well written code should handle, but still is a bit interesting to think about. The PostedFile object has a FileName property that according to MS, is: "The fully-qualiified path of the file from client's computer, such as 'C:\MyFiles\test.txt.'"
I thought this kind of seemed like a security violation to have the complete path in there. But I noticed that while IE sends the complete path (as per the documention), FireFox will only send the filename, such as "test.txt."
I like FireFox's implementation better -- there's no reason the web server should know the path of the file on my machine. It took me awhile to come to that conclusion, though, since it was FireFox causing me issues. I'm kind of annoyed at IE for sending the complete filename, but also for the docs that are IE-centric.

36bff4b8-79f4-40b3-979f-c28e2dfeab53|0|.0
Tags:
Development