I'm attempting to create an app that can access a directory in the app's directory, zip it with JSZip and send it to an API at the press of a single button.
For instance, say I have a directory "Components" in the app's directory. At the press of one button (Deploy Components) the app should zip up that directory using JSZip and send it off to an API. It seems like React cannot access its own directory short of imports, and imports do not import a directory, only a single file. What I need is the full Components directory, with all files and sub-directories (and their files and sub-directories, and so on), zipped up and punted off.
I know I could have a form and have the user upload a zip file, but this gives the user far too much freedom to upload whatever they like - they should only be able to send this Components directory (which lives with the app and can't be changed without re-deploying the app) to the API.
Does JSZip have any methods that can create a new zipped folder from a provided local directory path? Does React have any functions I can use to load a directory, rather than individual files? Does node.js provide anything I can use (I am not familiar with node.js)? In my API (written in C#) I can use things like the System.IO File and Directory static classes to do things like this, but I am not sure if it is possible with React.
Is this even remotely possible? I've spent the best part of an afternoon trying to find ways of accessing and manipulating a local directory with react and mostly drawn blanks.
Controller Advice bean not instantiated at proper order in Spring Boot 2.4
What should I enter to the connection string to connect my NodeJS application to a MongoDB server?
Unable to use Computed Property Values with Dots - Unable to Set as String - JS
I use the long list of codes similar to below codes, to check data frame with multiple columns
I have a bootstrap modal that needs to have both radio´s and checkboxes, and when I place the below code outside the Modal they work as expected, but as soon as I move them inside the modal I am not able to check/choose themI am using Bootstrap v
I have an image that I reference from with a Graphql query in my codeOver this image I want to have a linear-gradient, which is located in my css module
Jaxb-api and jaxb-runtime has same package with same class name called RUNTIMEMODELBUILDERJAVA and same interface with same package Navigator interface