mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 05:37:55 +01:00
use blob instead of file
for iOS 9
This commit is contained in:
parent
3b99a3c494
commit
491067b070
@ -188,16 +188,16 @@ export async function slice(target, name, mesh, settings, updateProgress) {
|
|||||||
|
|
||||||
switch (target) {
|
switch (target) {
|
||||||
case 'DOWNLOAD': {
|
case 'DOWNLOAD': {
|
||||||
const blob = new File([gcode], `${name}.gcode`, { type: 'text/plain' });
|
const file = new Blob([gcode], { type: 'text/plain' });
|
||||||
fileSaver.saveAs(blob);
|
fileSaver.saveAs(file, `${name}.gcode`);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'WIFI': {
|
case 'WIFI': {
|
||||||
if (settings.printer === 'doodle3d_printer') {
|
if (settings.printer === 'doodle3d_printer') {
|
||||||
const body = new FormData();
|
const body = new FormData();
|
||||||
const file = new File([gcode], 'doodle.gcode', { type: 'plain/text' });
|
const file = new Blob([gcode], { type: 'plain/text' });
|
||||||
body.append('file', file);
|
body.append('file', file, 'doodle.gcode');
|
||||||
|
|
||||||
// because fetch has no way of retrieving progress we fake progress
|
// because fetch has no way of retrieving progress we fake progress
|
||||||
let loaded = 0;
|
let loaded = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user