Created
November 23, 2023 14:12
-
-
Save bjoerntx/8d55eb9320b64db88cc8cb22344db6ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static readonly LiteDatabase db = new LiteDatabase(@"Filename=App_Data/documents.db; Connection=shared"); | |
public static void AddTemplate(MemoryStream stream, string id = null, string name = "template.tx") | |
{ | |
var templateId = id ?? "$/templates/" + Guid.NewGuid().ToString(); | |
db.FileStorage.Upload(templateId, name, stream); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment