Fix #1414 Add immediate thumbnail substitution after success download

This commit is contained in:
Nicolas Le Goff
2013-08-08 13:45:58 +02:00
committed by Romain Neutron
parent 6a2fb618d3
commit 7e1fafc5bb
2 changed files with 32 additions and 0 deletions

View File

@@ -336,6 +336,7 @@ $(document).ready(function () {
UploaderManager.Preview.render(file, function(img){
context.find('.thumbnail .canva-wrapper').prepend(img);
UploaderManager.addAttributeToData(uploadIndex, 'image', img);
UploaderManager.addAttributeToData(uploadIndex, 'b64_image', img.toDataURL("image/png") || '');
});
}
});
@@ -390,6 +391,11 @@ $(document).ready(function () {
$("select", UploaderManager.getSettingsBox()).serializeArray()
);
data.formData.push({
"name": "b64_image",
"value": data["b64_image"]
});
//remove current context
data.context.remove();