mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
User data are included in data archive
This commit is contained in:
parent
e06a658422
commit
4ec6213877
3
assets/3rdparty/jszip-utils/jszip-utils.js
vendored
3
assets/3rdparty/jszip-utils/jszip-utils.js
vendored
@ -80,6 +80,9 @@ JSZipUtils.getBinaryContent = function(path, callback) {
|
||||
xhr.overrideMimeType("text/plain; charset=x-user-defined");
|
||||
}
|
||||
|
||||
//Allow big files download
|
||||
xhr.setRequestHeader("Range", "bytes=0-9999999999999999999999999999999");
|
||||
|
||||
xhr.onreadystatechange = function(evt) {
|
||||
var file, err;
|
||||
// use `xhr` and not `this`... thanks IE
|
||||
|
@ -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;
|
||||
|
@ -84,10 +84,10 @@ ComunicWeb.components.account.export.worker = {
|
||||
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
|
||||
|
@ -139,7 +139,7 @@ class Dev {
|
||||
"3rdparty/jszip/jszip.min.js",
|
||||
|
||||
//JSZip utils
|
||||
"3rdparty/jszip-utils/jszip-utils.min.js",
|
||||
"3rdparty/jszip-utils/jszip-utils.js",
|
||||
);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user