newbie webfile

Hi, my service generate 2-10 PDF files, how do I download them.

I’ve made ready for test 2 PDF, but if I start methods for generate and download of two files in the same method I only get the last on.

Doing two buttons, with one file each, and even if I press them extremely fast (the second not that long after the first), I get both of them.

But doing a method, with:

I will only get the last one.

yes, the do have different filenames as output.

Make sure you define the Webfile as a property of the WebPage or Session. If it goes out of scope, it won’t be available when the browser requests it.

it is defined as a property of a container that has been embedded into that page. Also the god goes

outfile = new webFile

hm. I can’t think of any other reason you would run into this besides perhaps that you’re running out of memory. if you’re loading them from disk, make sure you set the InMemory property to False. If you’re loading them from memory, you may want to consider writing them to disk, depending on how large they are. You’ll take a memory and cpu hit when the user’s browser requests them, but at least they won’t ALL be in memory at the same time.

Post some code so we can take a look at it :slight_smile:

OK, what I did was to run a timer, and check for each file when it was set to NIL via the handler, then the timer started the next file.
worked nice, but I feel it is a work-around ?

I now have the web file as an array of files, so that I can control the sequence of the files to be written in the download folder.

BTW; is there a way of doing folders in download folders/ and put files into them… or only GLIMS ?

You can’t control the folder that the browser downloads files into.