SecureDownload Class Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

This class Inserts a link in a presentationtemplate or a document to a sequre download where the original URL will not be revealed to the visitor. This class writes HTML for the component to the supplied stream or the default response stream. The SecureDownload class acts as the underlying engine for the Secure download Content Studio component. Create an instance of this object, set the properties that does not have their default values you expect and call the invoke method. The generates inline code thus you must wrap it into a block element in order for the resulting code to validate. The code generated is fully HTML/XHTML strict compatible.
Inheritance Hierarchy

SystemObject
  ContentStudio.SiteCodeBase
    ContentStudio.Site.ActiveScriptingActiveScriptingBase
      ContentStudio.Site.ActiveScriptingSecurityBase
        ContentStudio.Site.ActiveScripting.SecuritySecureDownload

Namespace: ContentStudio.Site.ActiveScripting.Security
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public sealed class SecureDownload : SecurityBase

The SecureDownload type exposes the following members.

Constructors

  NameDescription
Public methodSecureDownload
Constructs a new instance of the SecureDownload class that writes to the default response stream
Public methodSecureDownload(Stream)
Constructs a new instance of the SecureDownload class that writes to the supplied stream
Top
Properties

  NameDescription
Public propertyBackwardsComponentCompatibilityMode
Sets or gets a value that indicates whether the code runs in backwards compatibility component mode. The default value is false.
(Inherited from ActiveScriptingBase.)
Public propertyChunkSize
Sets or gets Chunk size in bytes. Set to a low number for low bandwidth, if you are using high bandwidth you can increase this value for better performance The default value is MIN_CHUNKSIZE, values below this not allowed and will be set to MIN_CHUNKSIZE automatically.
Public propertyClass
Sets or gets Fieldname for class... The default value is an empty string
Public propertyComponentName
Gets the name of the component
(Overrides ActiveScriptingBaseComponentName.)
Public propertyConformance
Gets a value which specifies which type of code a component can generate.
(Overrides ActiveScriptingBaseConformance.)
Public propertyElementType
Gets a value which specifies the type of outer element the component generates.
(Overrides ActiveScriptingBaseElementType.)
Public propertyEncoding
Sets or gets the encoding the component uses. The default encoding is the UTF8 encoding without byte order mark.
(Inherited from ActiveScriptingBase.)
Public propertyLinkId
Sets or gets the name of an EPT field that contain the for the id of the file... The default value is an empty string
Public propertyLinkImage
Sets or gets Optional fieldname for image in link... The default value is an empty string
Public propertyLinkText
Sets or gets Fieldname for the text of the link... The default value is an empty string
Public propertyNewFileName
Sets or gets Optional NewFileName indicates a new name in the "Save As" dialog box... The default value is an empty string
Public propertyScriptTimeout
Sets or gets Server script timeout in seconds. Increase this value on slow connections and large files. The default value is 2200
Public propertyStaticClass
Sets or gets or static class The default value is an empty string
Public propertyStaticLinkId
Sets or gets or static id of the document in Content Studio to download. This value must be empty or be possible to convert to an integer. The default value is zero.
Public propertyStaticLinkImage
Sets or gets or static image in link The default value is an empty string
Public propertyStaticLinkText
Sets or gets or static text of the link The default value is an empty string
Public propertyStaticLinkUniqueId
Sets or gets Change this if you have more than one static link on the same page. The default value is "CSSecureDownload"
Public propertyStaticNewFileName
Sets or gets or static NewFileName indicates a new name in the "Save As" dialog box The default value is an empty string
Public propertyStaticTarget
Sets or gets or static target The default value is an empty string
Public propertyStaticTitle
Sets or gets or static title The default value is an empty string
Public propertyTarget
Sets or gets Fieldname for link target... The default value is an empty string
Public propertyTitle
Sets or gets Fieldname for the title... The default value is an empty string
Top
Methods

  NameDescription
Public methodAccessCheckForCurrentCategory
Determines if access us granted to the current category for the calling user.
(Inherited from SecurityBase.)
Public methodAccessCheckForCurrentDocument
Determines if access us granted to the current document for the calling user.
(Inherited from SecurityBase.)
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInvoke
This method invokes the component and writes its content into the specified stream
Public methodToString (Inherited from Object.)
Top
Fields

  NameDescription
Public fieldStatic memberMIN_CHUNKSIZE
Gets the lowest allowed chunk size that can be used. This constant field has the value 2048 which is equal to 2 Kb.
Top
Remarks

This class is mainly intended to be used by the Secure download component and is not suitable to be called directly from code. This class can throw exceptions thus your code should be wrapped within try/catch statements in order to avoid the entire page to crash.
See Also

Reference