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.
Format
saveFile(data, filename);
Parameter
Details
data
(Required)
The string
or ArrayBuffer
to save to the file
filename
(Required)
The name of the file that will be created
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