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");
|
xhr.overrideMimeType("text/plain; charset=x-user-defined");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Allow big files download
|
||||||
|
xhr.setRequestHeader("Range", "bytes=0-9999999999999999999999999999999");
|
||||||
|
|
||||||
xhr.onreadystatechange = function(evt) {
|
xhr.onreadystatechange = function(evt) {
|
||||||
var file, err;
|
var file, err;
|
||||||
// use `xhr` and not `this`... thanks IE
|
// use `xhr` and not `this`... thanks IE
|
||||||
|
@ -60,7 +60,7 @@ ComunicWeb.components.account.export.ui = {
|
|||||||
var closeModal = function(){
|
var closeModal = function(){
|
||||||
$(modal).modal('hide');
|
$(modal).modal('hide');
|
||||||
emptyElem(modal);
|
emptyElem(modal);
|
||||||
remove();
|
modal.remove();
|
||||||
}
|
}
|
||||||
this._exportModal.close = closeModal;
|
this._exportModal.close = closeModal;
|
||||||
this._exportModal.closeModal.onclick = closeModal;
|
this._exportModal.closeModal.onclick = closeModal;
|
||||||
|
@ -82,12 +82,12 @@ ComunicWeb.components.account.export.worker = {
|
|||||||
|
|
||||||
//Add raw json file
|
//Add raw json file
|
||||||
zip.file("source.json", JSON.stringify(data));
|
zip.file("source.json", JSON.stringify(data));
|
||||||
|
|
||||||
//Add the files to download
|
//Add the files to download
|
||||||
/*files_list.forEach(function(url){
|
files_list.forEach(function(url){
|
||||||
var path = urlToPath(url);
|
var path = urlToPath(url);
|
||||||
zip.file(path, urlToPromise(url), {binary:true});
|
zip.file(path, urlToPromise(url), {binary:true});
|
||||||
});*/
|
});
|
||||||
|
|
||||||
//Generated zip archive
|
//Generated zip archive
|
||||||
zip.generateAsync({type:"blob"}, function updateCallback(metadata) {
|
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
|
* @param {Object} info Information about the post to parse
|
||||||
*/
|
*/
|
||||||
var parsePost = function(post){
|
var parsePost = function(post){
|
||||||
if(post.file_path_url != null){
|
|
||||||
if(!files.includes(post.file_path_url))
|
if(post.kind != "youtube"){
|
||||||
files.push(post.file_path_url);
|
if(post.file_path_url != null){
|
||||||
|
if(!files.includes(post.file_path_url))
|
||||||
|
files.push(post.file_path_url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Parse comments
|
//Parse comments
|
||||||
|
@ -139,7 +139,7 @@ class Dev {
|
|||||||
"3rdparty/jszip/jszip.min.js",
|
"3rdparty/jszip/jszip.min.js",
|
||||||
|
|
||||||
//JSZip utils
|
//JSZip utils
|
||||||
"3rdparty/jszip-utils/jszip-utils.min.js",
|
"3rdparty/jszip-utils/jszip-utils.js",
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user