NetTalk Central

Author Topic: Delete file AFTER Sending (New Topic)  (Read 3695 times)

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Delete file AFTER Sending (New Topic)
« 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!
Greetz,
Sjoerd

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: Delete file AFTER Sending (New Topic)
« Reply #1 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
Real programmers use copy con newapp.exe

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: Delete file AFTER Sending (New Topic)
« Reply #2 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?

Greetz,
Sjoerd

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Delete file AFTER Sending (New Topic)
« Reply #3 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
Rene Simons
NT14.14

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: Delete file AFTER Sending (New Topic)
« Reply #4 on: October 01, 2010, 05:19:44 AM »
He Rene!

That did the trick.

Thanks for your reminder!

Groetjes!
Sjoerd
Greetz,
Sjoerd