This is an old problem of FileReference.save() in HTML5. I ran into a situation where I needed to save binary data to a file (level data), and the presence of garbage at the end of the file was critical for me.
For some reason I am currently using openfl 8.9.1 (lime 7.4.0), so the code may not match. In my case, problem resolved by adding string:
file: lime/ui/FileDialog.hx,
function: save,
after:
var path = defaultPath != null ? Path.withoutDirectory(defaultPath) : "download" + defaultExtension; var buffer = (data : Bytes).getData();
new string:
buffer = buffer.slice(0, (data:Bytes).length);
1 Like
