Consider the simplest possible CSP file upload/download page - you upload a file, it's saved in the database, and the file is immediately re-download via %CSP.StreamServer:
Class DC.Demo.CSPUpload.Page Extends (%Persistent, %CSP.Page)
{
Property stream As %CSP.BinaryStream [ Required ];
ClassMethod OnPage() As %Status
{
&html<<form method="post" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" />
</form>>
quit $$$OK
}
ClassMethod OnPreHTTP() As %Boolean [ ServerOnly = 1 ]
{
#dim %request As %CSP.Request
#dim %response As %CSP.

.png)
.png)





