This is a migrated thread and some comments may be shown as answers.

Incorrect ContentType in new versions! how solve it?

4 Answers 75 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
mastermehdi
Top achievements
Rank 2
mastermehdi asked on 09 Feb 2011, 09:19 AM

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

4 Answers, 1 is accepted

Sort by
0
Scott Horrocks
Top achievements
Rank 2
answered on 10 Feb 2011, 11:31 PM
Same issue.  Could really use a patch or work around ASAP since I already upgraded my controls and pushed to production.
0
mastermehdi
Top achievements
Rank 2
answered on 11 Feb 2011, 03:10 PM

with special thanks for your attention:

Which patch?

Which ASAP? how?

Please help me

0
Dimitar Terziev
Telerik team
answered on 11 Feb 2011, 03:27 PM
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.
0
mastermehdi
Top achievements
Rank 2
answered on 11 Feb 2011, 04:39 PM

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

Tags
AsyncUpload
Asked by
mastermehdi
Top achievements
Rank 2
Answers by
Scott Horrocks
Top achievements
Rank 2
mastermehdi
Top achievements
Rank 2
Dimitar Terziev
Telerik team
Share this question
or