Project

Contents

Issue #00005434

Added WGA.TempFile() as variant of WGAFile
Feature/Improvement

We added a special variant of WGAFile for handling TempFiles.

  • WGA.TempFile(filename)

This generates a file in the womodo tmp directory.

The returnd object is a WGAFile object so you can use alle the methods described in Issue #00005425.

In addition this Object has a method

  • addToDownloads()

that adds the file to the womodo download area and returns a download URL for that file.

The download is connected to the current HTTP session and is automatically removed when the session is closed.

Sample:

var textfile = WGA.TempFile("test.txt");
textfile.write("hallo zip");
var zip = WGA.TempFile("test.zip")
zip.createZipStream()
    .addFile(textfile)
    .close()
return zip.addToDownloads();