Unable to get XSD files to show in file dialog even though they are included in the allowed file extensions

Last post 04-16-2013, 3:14 PM by cutechat. 4 replies.
Sort Posts: Previous Next
  •  04-04-2013, 5:02 PM 77162

    Unable to get XSD files to show in file dialog even though they are included in the allowed file extensions

    Using the uploader with ASP.NET MVC 3 (Razor), I have configured the uploader like this:

     

            private void InitializeUploader(MvcUploader uploader)

            {

                uploader.UploadUrl = Response.ApplyAppPathModifier("~/UploadHandler.ashx");

                uploader.Name = "testFileUploader";

                uploader.MultipleFilesUpload = true;

                uploader.InsertText = "Add Files";

                uploader.InsertButtonID = "testFileSelector";

                uploader.AllowedFileExtensions = "xsd,xml";

                uploader.MaxSizeKB = 2097151;

            }

     

    Then when the file dialog is pointed at a directory with both XML and XSD files, only the XML files are visible:

     

     

    Notice the drop down above the "open" and "cancel" buttons reads "(*.xml,*.xml)".

     

    Is my configuration incorrect? Or am I missing something?

     

    When you select the "All Files" filter you see there is in fact an XSD file in the directory:

     

     

  •  04-05-2013, 1:03 PM 77170 in reply to 77162

    Re: Unable to get XSD files to show in file dialog even though they are included in the allowed file extensions

    Hi alonsorobles,

     

    Yes, I can reproduce this issue too. I will report it to the development team to check it.

     

    Regards,

     

    Ken 

  •  04-15-2013, 3:05 PM 77233 in reply to 77170

    Re: Unable to get XSD files to show in file dialog even though they are included in the allowed file extensions

    Any update on this?
  •  04-16-2013, 12:04 PM 77234 in reply to 77233

    Re: Unable to get XSD files to show in file dialog even though they are included in the allowed file extensions

    Hi alonsorobles,

     

    The developer still working on it, once issue is fix, I will keep you posted. Sorry for your inconvenience.

     

    Regards,

     

    Ken 

  •  04-16-2013, 3:14 PM 77237 in reply to 77162

    Re: Unable to get XSD files to show in file dialog even though they are included in the allowed file extensions

    alonsorobles ,

     

    It's a limitation of the HTML5 <input> now.

     

    The XSD mimetype is application/xml , and the browser will handle it as "*.xml"

     

    So , for HTML5 upload mode , it's not able to select XSD if you want to hide other file types.

     

    Here's two options :

     

    1 - add this script to let HTML5 mode allow select any files :

    <script> 

    function CuteWebUI_AjaxUploader_OnInitialize()
    {
          this.internalobject.SetDialogAccept("*");//which mean HTML5 <input type='file' accept='*' />
    }

    </script>

     

    2 - force the UploadType to Flash or Silverlight to avoid the HTML5 mode

     

    Regards,
    Terry

     


View as RSS news feed in XML