I used the forum topic as the start of what I'm doing :
Here's my code in the UniFileUploadCompleted event:
var DestFolder: string := UniServerModule.StartPath + 'UploadFolder\';
var DestName: string := DestFolder + ExtractFileName(UniFileUpload1.FileName);
CopyFile(PChar(AStream.FileName), PChar(DestName), False);
var AFile: TFile;
var AHtml: string := AFile.ReadAllText(DestName);
ACmd := '.execCmd(' + '''' + 'InsertHTML' + '''' + ' , ' + '''' + AHtml + '''' + ')';
UniSession.AddJS(UniDBHTMLMemo1.JSName + ACmd);
I'm getting an Unterminated String Constant error that I haven't been able to figure out. Any ideas what I need to change?
There is additional code I've got that makes changes to the AHtml variable. I don't believe that is the source of my problem because I have inspected the variable in debug, copied the contents and then switched the DBHTMLMemo into source edit mode on the toolbar, pasted in the modified HTML and toggled back to "regular" mode everything displays as expected.