Streams a file to the output stream if the user has the proper permissions

Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[ObsoleteAttribute("Deprecated in DNN 6.0.  It has been replaced by FileManager.Instance.WriteFileToResponse(IFileInfo file, ContentDisposition contentDisposition) ")]
public static bool DownloadFile(
	int PortalId,
	int FileId,
	bool ClientCache,
	bool ForceDownload
)
Visual Basic
<EditorBrowsableAttribute(EditorBrowsableState.Never)> 
<ObsoleteAttribute("Deprecated in DNN 6.0.  It has been replaced by FileManager.Instance.WriteFileToResponse(IFileInfo file, ContentDisposition contentDisposition) ")> 
Public Shared Function DownloadFile ( 
	PortalId As Integer,
	FileId As Integer,
	ClientCache As Boolean,
	ForceDownload As Boolean
) As Boolean

Parameters

PortalId
Type: System..::..Int32
The Id of the Portal to which the file belongs
FileId
Type: System..::..Int32
FileId identifying file in database
ClientCache
Type: System..::..Boolean
Cache file in client browser - true/false
ForceDownload
Type: System..::..Boolean
Force Download File dialog box - true/false

Return Value

returnsM:DotNetNuke.Common.Utilities.FileSystemUtils.DownloadFile(System.Int32,System.Int32,System.Boolean,System.Boolean)

See Also