mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-25 06:57:58 +01:00
use blob instead of file so it can be used on ios9
This commit is contained in:
parent
dd007b8bbf
commit
4cea3b3086
@ -231,14 +231,14 @@ export async function slice(target, name, mesh, settings, updateProgress) {
|
|||||||
body.append(key, fields[key]);
|
body.append(key, fields[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const file = new File([`;${JSON.stringify({
|
const file = new Blob([`;${JSON.stringify({
|
||||||
...settings,
|
...settings,
|
||||||
name: `${name}.gcode`,
|
name: `${name}.gcode`,
|
||||||
printer: { type: settings.printers, title: printerSettings[settings.printer].title },
|
printer: { type: settings.printers, title: printerSettings[settings.printer].title },
|
||||||
material: { type: settings.material, title: materialSettings[settings.material].title },
|
material: { type: settings.material, title: materialSettings[settings.material].title },
|
||||||
quality: { type: settings.quality, title: qualitySettings[settings.quality].title }
|
quality: { type: settings.quality, title: qualitySettings[settings.quality].title }
|
||||||
}).trim()}\n${gcode}`], 'doodle.gcode');
|
}).trim()}\n${gcode}`]);
|
||||||
body.append('file', file);
|
body.append('file', file, 'doodle.gcode');
|
||||||
|
|
||||||
await fetchProgress(url, { method: 'POST', body }, progress => {
|
await fetchProgress(url, { method: 'POST', body }, progress => {
|
||||||
updateProgress({
|
updateProgress({
|
||||||
|
Loading…
Reference in New Issue
Block a user