Ok, I thought I would give this a try and added the following code:
In the _sendfile embed of the WebHandler I have the following:
p_web.ReplyContentType = 'application/pdf'
Access:XOFTCRF.Open()
Access:XOFTCRF.UseFile()
CRF:CRF_File_Name = 'web\' & sub(p_FileName,len(clip(self.site.WebFolderPath)) + 2,255)
if CRF:CRF_File_Name[1] = '/' then CRF:CRF_File_Name = sub(CRF:CRF_File_Name,2,255).
loop x = 1 to len(clip(CRF:CRF_File_Name))
if CRF:CRF_File_Name
- = '/' then CRF:CRF_File_Name = '\'.
end
CRF:CRF_ID = p_web.GSV('CRF:CRF_ID')
If Access:XOFTCRF.Fetch(CRF:CRFID_key) = 0
loc:found = CRF:CRF_File{prop:size}
sendstring &= new(string(loc:found))
sendstring = CRF:CRF_File[1: loc:found]
! allows the browser to cache this file.
self.ForceNoCache = 0
self.HeaderDetails.CacheControl = ''
self.FileDate = today() - 200
self.FileTime = 6000 !clock()
! end of cache settings
self._SendMemory(sendString,loc:found)
dispose(sendString)
End
Access:XOFTCRF.Close()
If loc:found then return.
Then, in the button I added to the browse as type other, I added the following in the "user pressed button" embed:
p_web._SendFile(p_web.GSV('CRF:CRF_File_Name'))
Everything compiles fine. When I open the browse and press the button, nothing appears to happen. However, something is happening as I can no longer click on cancel or save, it appears to hang. I have used topspeed scan to look at the contents of the XOFTCRF file and there appears to be PDF content in the BLOB.
I would be glad to send a copy of this app but I would need to remove some templates that I use for BLOBs, and turn off SSL. I'm on NT 6.27.
Any ideas where I went wrong?
Thanks,
Jeff