Is it possible to extracz a zip file by file to file - javascript

Hy
I have a question, is it possible to unzip a file via php but by file to file? I read some some zip Exempels in the php Manuals but i need a Way to extracz one file and than the other file.
For example:
I have a zip file with many Folders and in this Folder are some pictures. Now i want to extracz the First zip item and check:
If it is a Folder
If true than create a new file, extracz the Folder, create a new Folder in this Folder and save there the new file
If it is a file, than check size and Type
If this is correct than do something with this file
Next item
I als wantask if it is possible to check via javascript the zip file?
I readed something about a zip Library
I only want to read all files and check size and Type before uploaded

Related

How does one use the File System Access API to read the contents of a package file

I would like to read the contents of a textbundle file containing the following files:
Unfortunately, the .showDirectoryPicker() method doesn't allow for the selection of a text bundle file and the .showOpenFilePicker() method doesn't identify the textbundle as a package contains subfolders and files.

How to create a folder in Infura IPFS with Node

I'am trying to upload a folder of json files to infura. If i try to upload them one by one I have no issue. But what I'am trying to achieve is something like this:
IPFSHostname://QmcUHTMEqc4pQvyToVhA3g8QjKGavhD56mh9rtSXWxQULx/folder_name/2.json
And basically add all the files to that url, where the last param would be the file name. Is this even possible?

How to unzip a file without creating archive folder in nodejs?

I have a file myarchive.zip that contains many directories, files, etc. Let's say this myarchive.zip file lives in a directory called "b". Currently, I am using the unzip module in Nodejs, using that I am able to create a directory by default called "myarchive" with the contents of the zip file. I do not want the code to create this "myarchive" directory - I just want the contents to be extracted to directory "b". Is this possible? If so, then how. Thanks!
The function that I am currently using for unzipping is:
const extractArchive = async (inputFileName, extractToDirectory) => {
fs.createReadStream(inputFileName)
.pipe(unzip.Extract({
path: extractToDirectory
}));
PS: inputFileName is the path of the zip file(base directory in which zip is present+ the file name)

How to upload folder in php

Hi i wanted to upload folder and move to some destination is it possible doing in php ? or at least i can read the folder name and create same folder in divination and copy all files into created folder.
You can do this with the new HTML5 directory capabilities. Just put the directory attributes in your input field. After you got the directory server-side, you can do everything you want with it.
URL for a simple guide:
http://www.w3bees.com/2013/03/directory-upload-using-html-5-and-php.html

how to upload file and store in folder in html java script

how to upload file using html, get that file using java script and it will store in to local folder?
Another question is, we have upload file using html, that file name is display in browser, now is that file stored in the temp folder or somewhere?

Categories

Resources