Difference between revisions of "Attachment class"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{CGscriptClass_Template
 
{{CGscriptClass_Template
 
|Name=Attachment
 
|Name=Attachment
|Description= Represents an attachment object
+
|Description= Represents an attachment object<br/>
 +
NOTE&nbsp;: can't use with mail template, bulk mail
 
|Constructors=
 
|Constructors=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
Line 27: Line 28:
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 
}}
 
}}
 
NOTE&nbsp;: can't use with mail template, bulk mail
 

Revision as of 05:11, 18 September 2014

Attachment



Represents an attachment object
NOTE : can't use with mail template, bulk mail

Constructors

  • (number resourceId "ResourceId of existing attachment") - Fetch existing attachment
  • (string name "Resource name. If set to empty, the name is taken from the downloaded or copied file"number parentResourceId "Parent resource") - Create new attachment

Methods

  • array GetChildAttachments(number parentResourceId "Parent resource") - Get all of the attachments associated with the resource
  • Empty SaveFromDownload(WebResponse response "Response from HttpRequest") - Download from an HttpRequest's response
  • Empty SaveFromFileCopy(string name "Name of the file"bool isTemp "Is the file temporary") - Copy from an already stored file using Catglobe.File
  • string ToString() - The string representation of the object.

Properties

  • number FileSize { get; } - The size of the file on disc
  • string Name { get; set; } - Resource name. If set to empty, the name is taken from the downloaded or copied file
  • string ObjectTypeName { get; } - The name of the type of object
  • number ResourceId { get; } - The Id of the Attachment
  • TypeInformation TypeInformation { get; } - Get information about this class.