saveFile (deprecated)

saveFile() is considered deprecated

Support for the saveFile() may be dropped in future versions of the JourneyApps Runtime. Please upgrade your app to use journey.files.saveFile to ensure that your app remains compatible with the JourneyApps Runtime.

Version and platform compatibility

saveFile was introduced in version 4.25.0 of the JourneyApps Container.

Due to limitations on mobile file systems, this method only works on Desktop platforms.

Format

saveFile(data, filename);

Examples

Saving a string:

var text = "Text to save!";
saveFile(text, 'my-file.txt');

Saving an image:

var buffer = view.myImage.toArrayBuffer();
saveFile(buffer, 'my-image.jpg');

Last updated