remove garbage from bytes when saving a file on html5, see : https://community.openfl.org/t/problem-with-filereference-save-xml/12776/2
This commit is contained in:
@@ -223,6 +223,7 @@ class FileDialog
|
||||
|
||||
var path = defaultPath != null ? Path.withoutDirectory(defaultPath) : "download" + defaultExtension;
|
||||
var buffer = (data : Bytes).getData();
|
||||
buffer = buffer.slice(0, (data:Bytes).length);
|
||||
|
||||
#if commonjs
|
||||
untyped #if haxe4 js.Syntax.code #else __js__ #end("require ('file-saver')")(new Blob([buffer], {type: type}), path, true);
|
||||
|
||||
Reference in New Issue
Block a user