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.


saveFile(data, filename);
data (Required)
The string or ArrayBuffer to save to the file
filename (Required)
The name of the file that will be created


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');