Add custom mime-type to exported sb3 and sprite

This commit is contained in:
Chris Garrity 2019-08-07 13:52:30 +01:00
parent 11b52c4e60
commit 40be416c9f

View file

@ -382,6 +382,7 @@ class VirtualMachine extends EventEmitter {
return zip.generateAsync({ return zip.generateAsync({
type: 'blob', type: 'blob',
mimeType: 'application/x.scratch.sb3',
compression: 'DEFLATE', compression: 'DEFLATE',
compressionOptions: { compressionOptions: {
level: 6 // Tradeoff between best speed (1) and best compression (9) level: 6 // Tradeoff between best speed (1) and best compression (9)
@ -432,6 +433,7 @@ class VirtualMachine extends EventEmitter {
return zip.generateAsync({ return zip.generateAsync({
type: typeof optZipType === 'string' ? optZipType : 'blob', type: typeof optZipType === 'string' ? optZipType : 'blob',
mimeType: 'application/x.scratch.sprite3',
compression: 'DEFLATE', compression: 'DEFLATE',
compressionOptions: { compressionOptions: {
level: 6 level: 6