Documentation > CMS Template API Library > EmailAttachment

CrownPeak.CMSAPI.EmailAttachment : CrownPeak.CMSAPI.UploadedFile

Class representing an email attachment

NameDescriptionType
Label

The label of the file.

Property
Matches

See if the particular Uploaded File has the key we are looking for. Usually used in the upload.aspx

Method
Extension

The filename extension for this file such as "jpg" or "doc"

Property
Img

Used to cache the Img object when the upload is an image. If the Path is not an image, then there will be an error on the image. Use Img.HasError and Img.ErrorMessage to check for an error.

Property
IsLoaded

Is the UploadedFile loaded. Call this On an instance to see if it is loaded with valid inforamation. If false, GetLink() will return an empty string

Property
OriginalName

The Original File Name

Property
Path

The CMS path to this attachment. Can be used in a rendered page as a link, Live links are substituted at publish time.

Property
RelationshipType

Use this to check of the uploaded file is a Link ((RelationshipType.Link) to another asset or an attachment (RelationshipType.Attach) that is managed as a part of the asset.

Property
Size

The size of the file in bytes.

Property
StringValue

Gets the string value. Only supports xml, csv, and txt files. If StringValue is called on an unsupported file type, such as an image it will return an empty string. The file is assumed to be encoded as UTF-8. If it is not UTF-8 or it uses a different extension that one of the supported, you may call ReadAsText() with the desired encoding instead.

Property
UploadKey

The Key associated with the asset - "my_photo", for example

Property

Connect with Crownpeak