Table of Contents

Method CreateContent

Namespace
FrameworkSystems.FrameworkBase.GlobalObj
Assembly
FrameworkSystems.FrameworkBase.dll

CreateContent(IGlobalObjects, ContentDownload)

Erzeugt für den übergebenen Content einen Download. Dieser kann innerhalb zehn Minuten über die zurückgegebene Url abgerufen werden.

Die Url beginnt mit den Platzhalter "fsbroker://", welche im Client durch die korrekte Adresse des Brokers ersetzt wird. Die Url kann zum Beispiel in folgenden Szenarien verwendet werden:

  • in der ViewDocument(string url) Action,
  • als Url im Browser-Control
  • oder als Datasource für ein Picture-Control.
string url = this.Global.CreateContent(new ContentDownload()
    {
        Content = System.IO.File.ReadAllBytes("C:\\temp\\Beispiel.pdf"),
        ContentType = "application/pdf",
        DownloadFileName= "MyDownload.pdf"
    });
ViewDocument(url);
public static string CreateContent(this IGlobalObjects global, ContentDownload content)

Parameters

global IGlobalObjects
content ContentDownload

Returns

string

Die Url