Incorrect ContentType in new versions! how solve it?

5 posts, 0 answers
  1. mastermehdi
    mastermehdi avatar
    39 posts
    Member since:
    Apr 2010

    Posted 09 Feb 2011 Link to this post

    hello

    In Telerik.Web.UI.dll v2010.1.616.35 I can use asyncUpload.UploadedFiles[0].ContentType correctly

    but in new versions (I test Telerik.Web.UI.dll v2010.3.1317.35) always return Incorrect (=application/octet-stream) ContentType!

    why?

    Any solution to solve this problem there?

    it's very important for me because i should use new version of Telerik.Web.UI.dll and also i should check ContentType instead of file extension

    if users change file extension and send it, result of my work is incorrect and if send a virus or ... my website security is in danger

    please help me

  2. Scott Horrocks
    Scott Horrocks avatar
    3 posts
    Member since:
    Apr 2004

    Posted 10 Feb 2011 Link to this post

    Same issue.  Could really use a patch or work around ASAP since I already upgraded my controls and pushed to production.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mastermehdi
    mastermehdi avatar
    39 posts
    Member since:
    Apr 2010

    Posted 11 Feb 2011 Link to this post

    with special thanks for your attention:

    Which patch?

    Which ASAP? how?

    Please help me

  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 11 Feb 2011 Link to this post

    Hello Scott,

    This problem will be fixed in the upcoming Q1 release.
    For now as a workaround I could suggest the following approach. Here you could find all MIME types base on the file extension. You should create such a Dictionary, so when a file is uploaded you will check it's extension and thus you could determine the ContentType.


    Regards,
    Dimitar Terziev
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. mastermehdi
    mastermehdi avatar
    39 posts
    Member since:
    Apr 2010

    Posted 11 Feb 2011 Link to this post

    thanks for your help

    but your answer has a point

    if user change file extension make problem

    anyway I hope that this issue be resolved in the near future

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017