Class AttachmentItem
Represents one item in the legacy attachment collection.
Inheritance
AttachmentItem
Assembly: AjaxUploader.dll
Syntax
public class AttachmentItem : Control, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, INamingContainer
Properties
Checked
Gets or sets whether the attachment is selected.
Declaration
public bool Checked { get; set; }
Property Value
ClientData
Gets or sets custom client data associated with the attachment.
Declaration
public string ClientData { get; set; }
Property Value
DataItem
Declaration
public AttachmentItem DataItem { get; }
Property Value
FileGuid
Gets the uploaded file GUID for this attachment.
Declaration
public Guid FileGuid { get; }
Property Value
FileName
Gets the display file name for this attachment.
Declaration
public string FileName { get; }
Property Value
FileSize
Gets the file size in bytes.
Declaration
public int FileSize { get; }
Property Value
IsCustom
Gets whether this item comes from a custom attachment provider.
Declaration
public bool IsCustom { get; }
Property Value
ShouldSave
Gets whether the attachment should be persisted when the form is processed.
Declaration
public bool ShouldSave { get; }
Property Value
Visible
Gets or sets whether the attachment is visible.
Declaration
public bool Visible { get; set; }
Property Value
Methods
ChangeToCustom(Guid)
Declaration
public void ChangeToCustom(Guid newguid)
Parameters
| Type |
Name |
Description |
| Guid |
newguid |
|
CopyTo(string)
Declaration
public void CopyTo(string newpath)
Parameters
| Type |
Name |
Description |
| string |
newpath |
|
Delete()
Deletes the attachment from the backing store and removes it from the collection.
Declaration
GetCustomData(string)
Gets a custom metadata value stored on the attachment.
Declaration
public string GetCustomData(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
GetTempFilePath()
Gets the temporary file path when the underlying provider supports the file system.
Declaration
public string GetTempFilePath()
Returns
HideAndUncheck()
Declaration
public void HideAndUncheck()
MoveTo(string)
Declaration
public void MoveTo(string newpath)
Parameters
| Type |
Name |
Description |
| string |
newpath |
|
OpenStream()
Opens a readable stream for the attachment contents.
Declaration
public Stream OpenStream()
Returns
Remove()
Declaration
SetCustomData(string, string)
Stores a custom metadata value on the attachment.
Declaration
public void SetCustomData(string key, string value)
Parameters
Implements