mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Add experimental fix for bbmodel file extensions on android
This commit is contained in:
parent
41faa51738
commit
b7d2dba3e8
@ -310,7 +310,13 @@ Object.assign(Blockbench, {
|
||||
saveAs(blob, file_name)
|
||||
|
||||
} else {
|
||||
var blob = new Blob([options.content], {type: "text/plain;charset=utf-8"});
|
||||
let type = 'text/plain;charset=utf-8';
|
||||
if (file_name.endsWith('json')) {
|
||||
type = 'application/json;charset=utf-8';
|
||||
} else if (file_name.endsWith('bbmodel')) {
|
||||
type = 'model/vnd.blockbench.bbmodel';
|
||||
}
|
||||
var blob = new Blob([options.content], {type});
|
||||
saveAs(blob, file_name, {autoBOM: true})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user