Last Updated: 14 Mar 2014 10:34 by ADMIN
Hristo Valyavicharski
Created on: 16 Sep 2013 14:45
Category: AsyncUpload
Type: Feature Request
ADD: RadAsyncUpload should upload files, which names are invalid for Windows.

Peter Filipov
Posted on: 14 Mar 2014 10:34
Here are the steps that you need to follow:

    1. Create custom handler.
    2. Override the CheckOriginalFileNameForInvalidChars method to return always false.
    3. Test under MAC to upload file with invalid char - \/ : *? "  <> | - the upload should be successful
    4. Test that after a postback the FileUploaded event is not fired for the uplaoded file
    5. In order to fire the event you need to override the Process method and change the original file name not to contains invalid chars. E.g:

 protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)

        var test = CreateDefaultUploadResult<UploadedFileInfo>(file);
        test.FileName = @"myname.jpg";
        return test;
Peter Filipov
Posted on: 14 Mar 2014 10:33
The issue is resolved in our latest internal build and it will be available in Q1.2014 SP1. Please test it and let me know if it works for you.
Posted on: 16 Sep 2013 16:35
While we may not be able to alter the file name submitted by the user, you already modify the file name saved in the temporary folder by prepending the user's file name with a unique value. If at that time you replaced the invalid characters in the rest of the file name the error should go away.

Mac users are able to specify file names for their files that are invalid in the Windows world (like on our server). Mac file names can start and end with blanks and might contain a character not allowed in Windows file names, "\ : / * ? " < > |".