Project

General

Profile

WFileResource - delete file after downloaded once

Added by Joseph Witanto almost 9 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)

RE: WFileResource - delete file after downloaded once - Added by Wim Dumon almost 9 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.

RE: WFileResource - delete file after downloaded once - Added by Joseph Witanto almost 9 years ago

Thanks for the explanation :)

I will try to implement it soon

RE: WFileResource - delete file after downloaded once - Added by Joseph Witanto almost 9 years ago

Thanks Wim :D It's working as needed

    (1-3/3)