Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Ajax Uploader
»
ContentType Property?
ContentType Property?
Last post 10-10-2008, 12:55 PM by
cutechat
. 1 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
10-10-2008, 12:28 PM
44789
Rando
Joined on 10-10-2008
Posts 2
ContentType Property?
Reply
Quote
I am evaluating your upload component and have a question. I am storing the uploaded files to a SQL Server and need the ContentType property for the associated uploaded file. This property is used when streaming the files back out to the client's browser later down the road.
For example, a PDF might come in with "applicaiton/pdf" or an image as "image/tiff" or a Word document as "applicaiton/msword". How can I capture that property using the ASP Upload control?
Thanks.
10-10-2008, 12:55 PM
44792
in reply to
44789
cutechat
Joined on 07-22-2004
Posts 2,332
Re: ContentType Property?
Reply
Quote
Hi,
I think the better solution is get the mime type by the file extension.
Please check our example code :
Ajax-Uploader\AdvancedCS20-NoAjax\App_Code\SampleUtill.cs
static public string GetMimeType(string filename)
Regards , Terry .