mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-21 21:27:56 +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) {
|
||||
case 'DOWNLOAD': {
|
||||
const blob = new File([gcode], `${name}.gcode`, { type: 'text/plain' });
|
||||
fileSaver.saveAs(blob);
|
||||
const file = new Blob([gcode], { type: 'text/plain' });
|
||||
fileSaver.saveAs(file, `${name}.gcode`);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'WIFI': {
|
||||
if (settings.printer === 'doodle3d_printer') {
|
||||
const body = new FormData();
|
||||
const file = new File([gcode], 'doodle.gcode', { type: 'plain/text' });
|
||||
body.append('file', file);
|
||||
const file = new Blob([gcode], { type: 'plain/text' });
|
||||
body.append('file', file, 'doodle.gcode');
|
||||
|
||||
// because fetch has no way of retrieving progress we fake progress
|
||||
let loaded = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user