ContentType Property

Object: SoftArtisans.FileUp
Syntax: ContentType
Type: String
Read/Write: Read Only
Description:

This property contains the MIME Content Type of the file, which is useful in determining the contents of the file.

It has been our experience that Netscape Navigator version 4 returns creative and diverse Content Types, depending on the file being uploaded. Internet Explorer typically returns the lowest common denominator, which is "application/octet-stream".

If there is more than one file being uploaded in a single page, only the first one will be displayed.

To examine the Content Type of multiple files in a single upload, there is an equivalent property for each file object, i.e., fileUpload.Form("File1").ContentType.

Examples:
ASP The Content Type of this upload is: <%=fileUpload.ContentType%>.
C# results.Append("The Content Type of this upload is: " +
fileUpload.ContentType);
VB.NET results.Append("The Content Type of this upload is: " + _
fileUpload.ContentType)

Copyright © 2010 SoftArtisans, Inc. All rights reserved.