Clarion 10
Nettalk 8.66
Postgres Backend
Have a browse that downloads a blob.
The code I use on on another browse doing the same thing works just fine.
On the problem browse I get the error:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
The code follows:
DO OpenFiles
Loc:RecordID = p_web.GetValue('TID')
dt:TemplID = Loc:RecordID
IF Access:doctempl.Fetch(dt:pk_dtmpsysid) = Level:Benign
bs# = dt:tmplblob{PROP:Size}
IF bs# > 0
loc:dir = p_web.GSV('UploadPath')
IF loc:dir <> ''
IF ~EXISTS(loc:dir)
CreateDirectory(loc:dir)
END
END
loc:fileName = p_web.GSV('UploadPath') &'\' & '$$$' & dt:TemplateName
MESSAGE(loc:FileName)
loc:brname = dt:TemplateName
IF BLOBTOFILE(cvfd:CustVFBlob, loc:fileName)
MESSAGE(loc:fileName & ' did not transfer properly')
MESSAGE('Invalid Document for the following ERRORCODE: ' & ERRORCODE())
ELSE
p_web.HeaderDetails.ContentDisposition = 'attachment; filename="'&loc:brname &'"'
p_web.SetValue('_parentPage','ServeTemplates')
p_web.publicpage = 1
END
END
END
DO CloseFiles
Any ideas why not working?
Thanks.