Search code examples
javascriptuser-interfaceftpzipftp-client

Creating a web UI for an ftp file server that can archive folders as ZIP to download


I'm trying to create a file server to serve a bunch of files for download and have a web-based UI to search/filter and download the files.

Right now i'm using a basic FTP server and i'm planning to create a simple (flask+js) web app that will redirect me to the ftp url for the selected file so it can be downloaded. The web app is needed so I can create my own tagging and filtering system.

However, i'm having trouble finding out how to download whole directories and folders as a zip. Basically like how google drive can have a "Download as zip" function while still keeping the raw folder available for browsing.

Is there a way to do this?


Solution

  • This involves working with "blobs", a JavaScript way of dealing with streamable binary data.

    I haven't tried this particular library myself, but there's an article here about using the JSZip library specifically for the kind of thing I think you're talking about: https://davidwalsh.name/javascript-zip