Create Zip and upload to Files Tab

371 views
Skip to first unread message

luiscajim...@gmail.com

unread,
Jul 24, 2017, 4:23:17 AM7/24/17
to Fujitsu RunMyProcess Developer Community
Hello!

I am creating a script to be able to generate a zip file with the upload of files. Initially I have a file upload widget, to then be able to create the zip file with those files. Right now I'm creating a zip, but when it's added to the upload widget it does not work. Some help?

var promise = null;

function create_zipNuevo() {

var zip = new JSZip();
zip.file("hello.txt", "Hello World\n");

if (JSZip.support.uint8array) {
promise = zip.generateAsync({type : "uint8array"});

}
else {
promise = zip.generateAsync({type : "string"});
}

}

function uploadZip(){
id_uploadfileautomatically.selectFile(promise.PromiseValue);
id_uploadfileautomatically.upload();
}

Dipen Raval

unread,
Jul 24, 2017, 7:10:58 AM7/24/17
to Fujitsu RunMyProcess Developer Community
Hi There, 

Good Day. 

Could you please elaborate your requirement and share a screenshot of your issue/error which you are facing, so that we 

can provide a proper solution. 

Please don't hesitate to contact us for any further query. 

Thanks & Regards, 
Dipen Raval 
Fujitsu RunMyProcess Support 


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/d4cfb214-4e19-404e-9004-7edc6e416ff8%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

luiscajim...@gmail.com

unread,
Jul 24, 2017, 7:24:29 AM7/24/17
to Fujitsu RunMyProcess Developer Community
The problem is that the uploadFile () function does not load the file into widgetUpload.The file is not uploaded, so it has not been saved in the file manager.

I hope you can help me. Thank you
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
ScritpToGroupRMP.png

Abhilash Sambhare

unread,
Jul 26, 2017, 6:13:49 AM7/26/17
to Fujitsu RunMyProcess Developer Community, luiscajim...@gmail.com
Hi There,

Can you please check the code snippet?

The file is not created so it is not uploaded into the widget.

The correct syntax to create a zip file is as follows:

var zip = new JSZip();
zip.add("hello.txt", "Hello World\n");



Hope this helps you.Please don't hesitate to contact us.
Thanks & Regards,
Abhilash Sambhare
Fujitsu RunMyProcess Support





To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

luiscajim...@gmail.com

unread,
Jul 26, 2017, 7:07:06 AM7/26/17
to Fujitsu RunMyProcess Developer Community, luiscajim...@gmail.com
Ok. i have the zip. But i need save it on File system. ¿HOW?


This is my new code that create a zip and i try upload to a widgetUploadFile (id_uploadfileautomatically), but doesn´t work. anyway to can work?

function uploadZip(){
var zip2 = new JSZip();
zip2.file("smile.gif", "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=", {base64: true});
id_uploadfileautomatically.selectFileId(zip2.files);
id_uploadfileautomatically.upload();

}
Reply all
Reply to author
Forward
0 new messages