NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: bergsj on September 29, 2010, 05:25:20 AM

Title: Delete file AFTER Sending (New Topic)
Post by: bergsj on September 29, 2010, 05:25:20 AM
Just wanted to reply on this oldie:

Re: Delete file AFTER Sending ( download)

I did what Bruce was saying: Prepend the filename with $$$.

The files won't go away.

My code:
Code: [Select]

loc:filenameonly = '$$$' & FORMAT(TODAY(), @D12) & FORMAT(CLOCK(), @T05) & RANDOM(1000,9999) & '-' & Doc:DocumentFileName & '.' & Doc:DocumentFileExt

loc:filename = clip(p_web.site.UploadsPath) & '\' & loc:filenameonly

p_web.HeaderDetails.ContentDisposition = 'attachment; filename="' & loc:filenameonly & '"'


Any ideas?

Cheers!
Title: Re: Delete file AFTER Sending (New Topic)
Post by: ccordes on September 29, 2010, 06:17:30 AM
What sendfile is looking for is '\$$$' in the filename. So be sure to send it the complete path to the file.

HTH
chris
Title: Re: Delete file AFTER Sending (New Topic)
Post by: bergsj on September 30, 2010, 10:53:12 PM
Chris,

I send the full filename to the client, including the $$$.

Can it be the fact that I use the uploadspath to temporarily place the files to be send?

Title: Re: Delete file AFTER Sending (New Topic)
Post by: Rene Simons on October 01, 2010, 04:22:47 AM
Hi Sjoerd,

As I recall, Bruce told us to serve the $$$ files from the web folder.

Groetjes,
Rene Simons
Title: Re: Delete file AFTER Sending (New Topic)
Post by: bergsj on October 01, 2010, 05:19:44 AM
He Rene!

That did the trick.

Thanks for your reminder!

Groetjes!
Sjoerd