Hi,
I have list of files on UI which i want to download in zip folder.
What is the way out to implement this approach.
Kindly share me any code or any approach on this ?
Discussion posts and replies are publicly visible
You need one of two available plug-ins: "Add Documents to Zip", or "Document Zipper", depending on your use case. Document Zipper appears to be an easier tool if you want to create a zip file based on the entire contents of an existing Appian file folder; Add Documents to Zip is probably the better tool when you need to manually construct a zip from an arbitrary list of files, and/or when you need to add new files to an existing zip file.
Unfortunately, nobody here will be able to write your process model for you, so i'm afraid the best approach I can recommend is just to try, see how far you can get, and come back here with more specific questions when you get stuck on something. Previous posts (like in the few other threads you've added recent comments to), should provide a lot of help as far as how to implement one of these.
Below plugin will help
https://community.appian.com/b/appmarket/posts/document-zipper
You can also have a look at - https://community.appian.com/b/appmarket/posts/add-documents-to-zip.
Just to kick start. I will select list of files on UI grid which I will pass to Process model.
In that at first node I will create new folder n then will push all selected files in that. Then will add Document to Zipper smart service for further processing. I am going to implement this approach. Will post you if any issue comes. I hope that is correct on.
If you use the "add documents to zip" smart service (and not "document zipper"), then you can feed in the document ids directly without worrying about copying / moving them to a different folder within Appian first. For most use cases this is probably a faster and more flexible approach.
Thanks a lot . I have not moved that much so I will change my approach on "Add Document to Zip"
In this why its asking Save In Folder. I need to download that zip file on the fly. I don't need to save.
I hope this tool is used to download zip file on linkField() or any button on UI . We don't need to save anywhere that zip file.
How you are passing doc details to PM.
I mean below details you are passing from Interface or plugging at PM level.
I think so Base Doc/Save In folder/Document Path is optional here rest is mandatory.
Why do we need to pass path here if required as i just want to bundle out all my files n zip them in one folder. i don't want to save anywhere.
Kindly share some inputs on that.
Why do we need this Documents Path as we are storing document id in DB and getting back by using some function from Appian portal. Then which path we need to refer here.
All documents generated in Appian by a smart service or other means need to save into an Appian folder, whether you need to keep the document afterwards or not. If you only need to keep this zip file long enough to be downloaded by a user, my suggestion is to save it into a common temporary documents folder, and then clean up (delete) the generated zip file at a later time.