Hi Jeff,
I use an Embed "RenameFile PROCEDURE in the Web Handler - after Parent call: ( this renames a file and sets the correct path for the chosen data set)
!MESSAGE('pname ' & p_name)
if p_name = 'upfilename' ! uploading schedule file
locpath = p_web.GSV('tProvRptDir') ! this is the provider file
! message('report dir ' & locpath)
locpath = clip(locpath) & '\INFILE\' ! this adds the Infile path
! message('upload path: ' & locpath)
RETURNVALUE = Parent.RenameFile(p_name,p_filename,locpath)
RETURN RETURNVALUE
END
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Second: This sends a file which is stored in a BLOB - get the blob, check it to see if it holds a file, if it does then extract it and send it
WebHandler - -SendFile PROCEDURE
Data section:
blobname StringTheory
sendstring StringTheory
CODE - Before Parent Call
!! working on generic code in the class to do this. This is for making a file from BLOB to send
Access:Blobfile.Open()
Access:Blobfile.UseFile()
blobname.SetValue(sub(p_FileName,len(clip(self.site.WebFolderPath)) + 2,255))
if blobname.sub(1,1) = '/' then blobname.setvalue(blobname.sub(2,255)).
blobname.replace('/','\')
BF:FileName = blobname.GetValue()
If Access:Blobfile.Fetch(BF:NameKey) = 0
sendstring.FromBlob(BF:Bin)
! allows the browser to cache this file.
! self.ForceNoCache = false
self.HeaderDetails.CacheControl = ''
self.FileDate = today() - 200
self.FileTime = 6000 !clock()
! or tell browser not to cache file
self.ForceNoCache = true
! end of cache settings
self.SendString(sendString,1,0,true)
loc:done = true
End
Access:Blobfile.Close()
If loc:done then return.
-------------------------------------------------------------------
Hopefully these two code snippets will help you get done what you need to get done.
Ron