Upload filename truncates at '#' character

Dec 28, 2009 at 1:51 AM

Hi, thanks for providing this control, pretty neat :)

I'm having a problem with files with the '#' character in the name. If a file is name - abc#123.txt - the file will be uploaded as 'abc' everything after the '#' is removed by the time the FileUpload.ashx is reached, the context.request.querystring contains something like ?id=n&filename=abc

After reading up on Url encoding I can understand why this is happening but I can't see where the filename is truncated - I'm having problems debugging the controls, can't load symbols, so I've begun to reproduce the behaviour in another project. The FileOpenDialog.Name contains the correct name, and it is displayed correctly in the controls list of items, the file also uploads withouth problems, but the filename is truncated.

I've fiddled about a bt obviously but am unable to successfully substitute %23 for '#' or find the location where the filename is actually truncated. Any pointers would be greatly appreciated




Dec 28, 2009 at 6:50 AM
Edited Dec 28, 2009 at 8:47 AM

ok sorted it out, I just replaced calls to get the filename with a UrlEncoded version as I'd done previously but his time I copied the new xap file over. Peculiar that xap files aren't updated in dependent projects, am I missing a setting?