What is the 'hidden' limit on file name le

2019-06-14 11:15发布

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

'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.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?

2条回答
神经病院院长
2楼-- · 2019-06-14 12:05

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.

查看更多
够拽才男人
3楼-- · 2019-06-14 12:20

For windows it is 255 characters including the complete filepath.

查看更多
登录 后发表回答