Click or drag to resize
AttachmentURLProviderGetAttachmentUrl Method (Guid, String, String, Int32, String, String)
Returns attachment URL.

Namespace: CMS.DocumentEngine
Assembly: CMS.DocumentEngine (in CMS.DocumentEngine.dll) Version: 12.0.0
Syntax
C#
public static string GetAttachmentUrl(
	Guid attachmentGuid,
	string safeFileName,
	string extension = null,
	int versionHistoryId = 0,
	string prefix = null,
	string variant = null
)

Parameters

attachmentGuid
Type: SystemGuid
Attachment GUID.
safeFileName
Type: SystemString
Attachment safe file name. Use GetSafeFileName(String, String) method to get file name in format suitable for URL.
extension (Optional)
Type: SystemString
File extension. If not provided, default friendly extension is used from global settings.
versionHistoryId (Optional)
Type: SystemInt32
ID of the document version for which the attachment version should be displayed.
prefix (Optional)
Type: SystemString
URL prefix, if null, "getattachment" is used, the prefix must be supported by the URL rewriting engine.
variant (Optional)
Type: SystemString
Identifier of the attachment variant definition.

Return Value

Type: String
See Also