Search:
Namespaces
Discussions
.NET v1.1
Feedback
File Mime Type
Messages
Related Types
This message was discovered on
ASPFriends.com 'ngfx-io' list
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Ryan Trudelle-Schwarz
Is there any way to get the mime type of a file with the framework =
classes? Any other ways of getting this?
Thanks, Ryan
---
[This E-mail scanned for viruses by Declude Virus]
Reply to this message...
dave wanta (VIP)
unfortunately the only way I ever seen this done was to have an internal
table inside of your program that matches file extensions to mime type.
I don't believe there is anything in the framework to do this manually for
you, but I've seen a couple of charts out on the web with the data.
--dave
----- Original Message -----
From: "Ryan Trudelle-Schwarz" <
Click here to reveal e-mail address
>
To: "ngfx-io" <
Click here to reveal e-mail address
>
Sent: Thursday, June 20, 2002 2:35 PM
Subject: [ngfx-io] File Mime Type
Is there any way to get the mime type of a file with the framework classes?
Any other ways of getting this?
Thanks, Ryan
---
[This E-mail scanned for viruses by Declude Virus]
| [ngfx-io] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.aspfriends.com/aspfriends/ngfx-io.asp
= JOIN/QUIT
Reply to this message...
Kloberg Mac (LAM) (VIP)
Ryan,
I've ran into this a while ago and built a select case construct (vb) that
covers about 98% of the known types. I can send this to you offlist. Let me
know if you want it...
--
Sincerely,
Mac Kloberg
LIEBHERR AMERICA INC.
http://www.liebherr.com
[Original message clipped]
Reply to this message...
Mitch Denny (VIP)
Ryan,
If you were executing with the appropriate trush you could
look up the registry:
HKEY_CLASSES_ROOT\.<extension>\ContentType
Not all keys have the associated value and it would take
a bit of time to acccess the values in the hive. Your
best approach would probably be to have a static lookup
table in your program like Dave and Mac have suggested
and use this as a fall back mechanism. In your code you
will probably want to put your registry access in a try
block and tap into the security system to make sure things
go smoothly if you happen not to be fully trusted.
More food for thought.
----------------------------------------
- Mitch Denny
-
Click here to reveal e-mail address
- +61 (414) 610-141
-
-----Original Message-----
From: dave wanta [mailto:
Click here to reveal e-mail address
]
Sent: Friday, 21 June 2002 06:18
To: ngfx-io
Subject: [ngfx-io] Re: File Mime Type
unfortunately the only way I ever seen this done was to have an internal
table inside of your program that matches file extensions to mime type.
I don't believe there is anything in the framework to do this manually
for you, but I've seen a couple of charts out on the web with the data.
--dave
----- Original Message -----
From: "Ryan Trudelle-Schwarz" <
Click here to reveal e-mail address
>
To: "ngfx-io" <
Click here to reveal e-mail address
>
Sent: Thursday, June 20, 2002 2:35 PM
Subject: [ngfx-io] File Mime Type
Is there any way to get the mime type of a file with the framework
classes? Any other ways of getting this?
Thanks, Ryan
---
[This E-mail scanned for viruses by Declude Virus]
| [ngfx-io] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.aspfriends.com/aspfriends/ngfx-io.asp
= JOIN/QUIT
| [ngfx-io] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.aspfriends.com/aspfriends/ngfx-io.asp
= JOIN/QUIT
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com