Adjust type of data URI when saving (#452)
Previously the type used for the data URI when saving was text/plain. On iPad, this caused the file to automatically have a .txt extension added (so files ended up with names like "drawing-xyz.json.txt"). This meant that the files couldn't be loaded by the tool, which expects only files with a .json extension. Now, the type used is application/json, which means that the files get saved with the correct extension and can be successfully loaded on iPad.
This commit is contained in:
parent
d505c6615d
commit
5ce5e5ac1e
@ -96,7 +96,7 @@ export async function saveAsJSON(
|
|||||||
} else {
|
} else {
|
||||||
saveFile(
|
saveFile(
|
||||||
name,
|
name,
|
||||||
"data:text/plain;charset=utf-8," + encodeURIComponent(serialized)
|
"data:application/json;charset=utf-8," + encodeURIComponent(serialized)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user