Project

General

Profile

JWWFileResource - delete file after downloaded once

Added by Joseph Witanto almost 11 years ago

Hi, I just set up WFileResource with name resource
then I redirect wApp to that resource

What should I do to immediately delete the resource (and file) after it is downloaded once?

Thanks :)


Replies (3)

WD RE: WFileResource - delete file after downloaded once - Added by Wim Dumon over 10 years ago

Hey Joseph,

This is not part of the functionality of a WFileResource. You can specialize WFileResource and modify handleRequest() to serve only the first request and return errors on all other requests, and also to delete the file when it has been downloaded completely or when handleAbort() is called.

Wim.

JW RE: WFileResource - delete file after downloaded once - Added by Joseph Witanto over 10 years ago

Thanks for the explanation :)
I will try to implement it soon

JW RE: WFileResource - delete file after downloaded once - Added by Joseph Witanto over 10 years ago

Thanks Wim :D It's working as needed

    (1-3/3)