kopia lustrzana https://github.com/backface/turtlestitch
10 MB limit for media embedded in cloud projects
rodzic
2bad75b407
commit
c07c16134b
17
cloud.js
17
cloud.js
|
@ -327,7 +327,8 @@ Cloud.prototype.saveProject = function (ide, callBack, errorCall) {
|
||||||
var myself = this,
|
var myself = this,
|
||||||
pdata,
|
pdata,
|
||||||
media,
|
media,
|
||||||
size;
|
size,
|
||||||
|
mediaSize;
|
||||||
|
|
||||||
ide.serializer.isCollectingMedia = true;
|
ide.serializer.isCollectingMedia = true;
|
||||||
pdata = ide.serializer.serialize(ide.stage);
|
pdata = ide.serializer.serialize(ide.stage);
|
||||||
|
@ -336,18 +337,18 @@ Cloud.prototype.saveProject = function (ide, callBack, errorCall) {
|
||||||
ide.serializer.isCollectingMedia = false;
|
ide.serializer.isCollectingMedia = false;
|
||||||
ide.serializer.flushMedia();
|
ide.serializer.flushMedia();
|
||||||
|
|
||||||
size = pdata.length + (media ? media.length : 0);
|
mediaSize = media ? media.length : 0;
|
||||||
/*
|
size = pdata.length + mediaSize;
|
||||||
if (size > 5242880) {
|
if (mediaSize > 10485760) {
|
||||||
new DialogBoxMorph().inform(
|
new DialogBoxMorph().inform(
|
||||||
'Snap!Cloud',
|
'Snap!Cloud - Cannot Save Project',
|
||||||
'Project exceeds 5 MB size limit',
|
'The media inside this project exceeds 10 MB.\n' +
|
||||||
|
'Please reduce the size of costumes or sounds.\n',
|
||||||
ide.world(),
|
ide.world(),
|
||||||
ide.cloudIcon(null, new Color(180, 0, 0))
|
ide.cloudIcon(null, new Color(180, 0, 0))
|
||||||
);
|
);
|
||||||
throw new Error('Project exceeds 5 MB size limit');
|
throw new Error('Project media exceeds 10 MB size limit');
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// check if serialized data can be parsed back again
|
// check if serialized data can be parsed back again
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -2803,3 +2803,6 @@ end - bulk of 151215
|
||||||
* Morphic: Handling of diacritics, [Alt] + key in input fields (Windows), Thanks, DaDoro!!
|
* Morphic: Handling of diacritics, [Alt] + key in input fields (Windows), Thanks, DaDoro!!
|
||||||
* NL translation update
|
* NL translation update
|
||||||
|
|
||||||
|
151215 - more changes
|
||||||
|
------
|
||||||
|
* Cloud: 10 MB cloud upload limit for media per project
|
||||||
|
|
Ładowanie…
Reference in New Issue