开发者

What is the 'hidden' limit on file name length when using an ASP.NET FileUpload control?

I have a FileUpload control, and when I select the file

'bbbbbbbbbbbbbbbbb开发者_高级运维bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.txt'

, (which I can create in Windows with no problem), it is saying that it does not have a file when I postback.

It works fine for smaller file names. What's going on?


This could happen if you try to save the file in a folder on the server side (like a temp folder in c:\documents and settings\blabla...\temp) and exceed the MAX_PATH limit of 255 characters while on the client the file is located at the root and MAX_PATH is not reached.


For windows it is 255 characters including the complete filepath.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜