views:

39

answers:

1

According to this great article about HTTP uploads by Scott Hanselman, the browser typically sends a file name with the file's contents. Can I rely on the file name always being transmitted or do I have to give the user the option to enter a name if none was submitted? (If a name was submitted I do not want to prompt him for a specific reason that is not important). I would rather save myself the effort of implementing that feature if I can rely on the file name being present in all relevant browsers (meaning IE6+).

I am looking for some practical experience here. The wording of the standard is not that important to me as is the actual browser behavior today.

+1  A: 

As ssokolow has noted you can never rely on anything coming from the client, but you can probably assume that 99% of the time you will get a filename.

Generate a filename on the possibility you dont and notify the user if you had to generate a filename.

Toby Allen