Files of type in browse button

Last post 03-03-2007, 3:48 AM by rpsu. 5 replies.
Sort Posts: Previous Next
  •  03-01-2007, 3:44 PM 27085

    Files of type in browse button

     Question 1

    How do I show up only allowed file extension in browse dialog box. Currently by default, it shows All for both image insert and document insert.

    Current entries in browse dialogbox

    All Files(*.*)

    Pictures (*.gif, *.jpg)

    HTNL ( *.html, *.htm)

     Question2

    Is there any way I can show supported files types on dialog box. I don't want my customer to go and try some file and when he clicks upload he knows it is not supported. Instead some text letting him know what is supported would greatly help.
     
    thanks for help.
     
  •  03-01-2007, 4:05 PM 27088 in reply to 27085

    Re: Files of type in browse button

    rpsu,
     
    Please check the following article:
     
    Restricting Files by Extensions and Types:
     
     
    Restricting Document Files by Extensions and Types:
     
     
     
    >>Is there any way I can show supported files types on dialog box. I don't want my customer to go and try some file and when he clicks upload he knows it is not supported. Instead some text letting him know what is supported would greatly help.
     
    Yes. You can get the file Extensions and Types.
     
    For example,  open InsertImage.Frame.aspx file. You can find the following code:
     
    foreach (string ext in secset.ImageFilters)
    {
    .....
    }
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-01-2007, 4:16 PM 27089 in reply to 27088

    Re: Files of type in browse button

    Check out below screen. It shows file type in dropdown box. I like to change from all to only supported types. This is not even image insert, it is upload document still it shows option of image and html
     
     
     
  •  03-01-2007, 4:19 PM 27090 in reply to 27089

    Re: Files of type in browse button

    Uploading image again Not sure why it is not showing up in previous upload
     
    Check out below screen. It shows file type in dropdown box. I like to change from all to only supported types. This is not even image insert, it is upload document still it shows option of image and html
  •  03-02-2007, 2:37 AM 27099 in reply to 27090

    Re: Files of type in browse button

    Hi rpsu,
     
    HTML doesn't define restricted file types, you need to check if the file is a valid type *after* the user has selected the file and clicked open. It's a security restriction, the reason IE shows pictures and HTML as options is because Microsoft have chosen to do so, not because of any filters defined in the HTML.
     
    Different browsers may show different filters depending on what they feel are the most commonly selected file types.
     
    Ady
  •  03-03-2007, 3:48 AM 27124 in reply to 27099

    Re: Files of type in browse button

    thanks.
View as RSS news feed in XML