diff --git a/src/lime/ui/FileDialog.hx b/src/lime/ui/FileDialog.hx index fee1ee5b5..f9d2284fa 100644 --- a/src/lime/ui/FileDialog.hx +++ b/src/lime/ui/FileDialog.hx @@ -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);