User data are included in data archive

This commit is contained in:
Pierre
2018-05-14 16:53:11 +02:00
parent e06a658422
commit 4ec6213877
4 changed files with 14 additions and 8 deletions

View File

@ -60,7 +60,7 @@ ComunicWeb.components.account.export.ui = {
var closeModal = function(){
$(modal).modal('hide');
emptyElem(modal);
remove();
modal.remove();
}
this._exportModal.close = closeModal;
this._exportModal.closeModal.onclick = closeModal;

View File

@ -82,12 +82,12 @@ ComunicWeb.components.account.export.worker = {
//Add raw json file
zip.file("source.json", JSON.stringify(data));
//Add the files to download
/*files_list.forEach(function(url){
files_list.forEach(function(url){
var path = urlToPath(url);
zip.file(path, urlToPromise(url), {binary:true});
});*/
});
//Generated zip archive
zip.generateAsync({type:"blob"}, function updateCallback(metadata) {
@ -147,9 +147,12 @@ ComunicWeb.components.account.export.worker = {
* @param {Object} info Information about the post to parse
*/
var parsePost = function(post){
if(post.file_path_url != null){
if(!files.includes(post.file_path_url))
files.push(post.file_path_url);
if(post.kind != "youtube"){
if(post.file_path_url != null){
if(!files.includes(post.file_path_url))
files.push(post.file_path_url);
}
}
//Parse comments