Support forums

Get ContentType of File

Last post 06-29-2009, 9:31 PM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  06-29-2009, 5:29 PM 53608

    Get ContentType of File

    In using a FileUpload control it is possible to get the ContentType (for example, "image/jpeg") of the file. I was wondering if there is any sort of equivalent property that I can use to get this value when using Ajax Uploader. Any sort of instructions on how I can do this would be awesome. Thanks.
  •  06-29-2009, 9:31 PM 53618 in reply to 53608

    Re: Get ContentType of File

    Ajax uploader do not provide it because the mime type sent from client is not trust-able.
    Please check the
    static public string GetMimeType(string filename)
    of  our example :  Ajax-Uploader\AdvancedCS20-NoAjax\App_Code\SampleUtill.cs
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems