Soap.InvokeRegistry.TSOAPAttachment.ContentType
Delphi
property ContentType: string read FContentType write FContentType;
C++
__property System::UnicodeString ContentType = {read=FContentType, write=FContentType};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Soap.InvokeRegistry.pas Soap.InvokeRegistry.hpp |
Soap.InvokeRegistry | TSOAPAttachment |
Description
Specifies the MIME type of the attachment data.
Use ContentType to determine the MIME type (format) used for the data in the attachment.
When receiving an attachment, the ContentType property is automatically set to reflect the value of the content-type header of the part of the multipart form that holds the attachment. You can read this property to determine how to interpret the contents of the file that the CacheFile property indicates.
When sending an attachment, set ContentType to indicate the MIME type for the data you are sending. This property should be set only after setting the SourceString property calling the SetSourceFile or SetSourceStream method. That is because calling SetSourceStream or SetSourceFile automatically sets ContentType to 'Application/binary', and setting SourceString automatically sets ContentType to 'Text/simple'. There is no need to reset ContentType if these values are correct.