mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
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
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ export async function saveAsJSON(
|
|||
} else {
|
||||
saveFile(
|
||||
name,
|
||||
"data:text/plain;charset=utf-8," + encodeURIComponent(serialized)
|
||||
"data:application/json;charset=utf-8," + encodeURIComponent(serialized)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue