Questions tagged [zip]

ZIP is more than just a way to compress files - it's a versatile format that enables users to conveniently package multiple files and directories into one convenient archive.

Creating a zip file from database or binary file content using PHP

I'm looking to create a zip file using PHP, however my source files are all stored in databases rather than on disk. The content of the files I need to pack is saved as binary data in one database, while the metadata is stored in another. I've ...

Transferring a zipped file between a Node.js server and a Node.js client

I am facing an issue with sending a zip file from a node.js server to a node.js client. The problem is that when I try to save the zip file, it becomes corrupted and cannot be opened. To create and send the zip file to the client, I am using the adm-zip l ...

Sending a function from a local environment to a cloud function and storing it in a bucket

I have successfully implemented the following function on my node.js localhost: // index.js const scrape = require('website-scraper'); const PuppeteerPlugin = require('website-scraper-puppeteer'); const path = require('path'); ...

Using JSON Zip Response with Node.js

Hi there! I'm relatively new to working with node.js and I'm currently attempting to send a zip file containing JSON results, but I've been encountering some unexpected difficulties along the way. My tech stack includes NodeJS, ExpressJS, LocomotiveJS, Mo ...

utilize PHP to compress an entire directory on a remote FTP server

I've been brainstorming ideas for creating an automated PHP transfer system between two servers. Server A only has FTP access, while server B has both FTP access and can run PHP scripts. My goal is to transfer all files from server A to a folder on s ...

What is the procedure for sending an email with a zip file attachment using Python?

In the directory of my project, I have a zip folder called csv located at: /home/local/user/project/zip_module/csv I am interested in sending an email with this zip folder attached as a file. Previously, I have used Python's smtplib module to send emai ...

Why is the Zip archive downloader not functioning properly when using Node.js and Archiver (Unexpected end of archive error)?

Looking to download multiple files using archiver with express. The server should respond to a post request from the client by sending a .zip file. However, there seems to be an issue where WinRAR displays an error message "! 98I9ZOCR.zip:Unexpected end of ...

PHP ZipArchive causing a white screen error

I have successfully enabled php_zip.dll in my php.ini file and it is reflected in my phpinfo. This means that ZipArchive is now enabled. The code snippet I am using is as follows: $zipname='exports.zip'; $zip=new ZipArchive; $zip->open($zipname, ZipArc ...

Restoring a file from archive in Amazon Web Services S3

As I work on a project, my current task involves uploading a collection of JSON files to Amazon S3 for mobile clients to access. To potentially lower the expenses related to individual file transfers, I am pondering whether it is achievable to unzip a fil ...

Verify if the file uploaded in django is a zip file

I'm working on a POST method handler in Django that deals with uploaded files, and I want to ensure that the file is a valid zip file before continuing. My current code snippet looks like this: @login_required(login_url="login/") def upload(request): ...

Having difficulty accessing all documents through "zip_read" function from ZIP archive

I am working on a task to iterate through all the files within a zip file that has approximately 65000 files. However, I am only able to read 315 files out of them. Despite checking the error log, I can't seem to figure out the reason for this issue. The ...

Download a collection of base64 images as a ZIP file in Angular 4

I am currently developing an Angular2 v4 app using Typescript and I'm looking for a solution to download multiple images (in base64 format) as a Zip file. For instance, I have a sample array like this (containing fake base64 images just for illustrat ...

Creating a blank zip file using the archiver module in node.js

I am currently attempting to archive a folder by utilizing archiver. The structure of the folder that I wish to archive is as follows : Project | app.js | tmp | folderToArchive │file1.txt │file2.txt │fil ...

What causes identical dictionary values to return False when compared in Python version 3.5.2?

To utilize the example, you will need to first create a JSON file named test.json: { "/apps/media/efel_data/efel_gui/results/305933/20180515094131/u_res": { "step_700.0": { "stimuli": [ {"delay": 620.0, "amp": 700.0, "duration": 1000.0 ...

A method in Python for extracting a specific subset of lists in order to create a plot

I have a functional code snippet, but I believe there is room for improvement. Essentially, I have lists that I zip together and then create a subset based on a condition. The goal is to plot both the original zip list and the subset, with the subset in a ...

Python script to extract comments from numerous zip files

I recently delved into the world of Python and now face a challenge that entails rifling through thousands of zip files to uncover crucial clues hidden in their comments. The aspect causing me great difficulty is the extraction of these elusive comments. ...

The Zip file generated in memory is experiencing corruption

I'm encountering an issue while attempting to serve a zip file generated in memory by Flask to a JavaScript front-end. However, the downloaded file appears corrupted and I am unsure of what mistake I may be making. @app.route('/route') def test_zip(): ...

Submit compressed files to the platform for users to access and download

My current project involves building an express (node.js) application, which generates mp3 files for users and saves them in a designated folder on the server. Here is how the file structure of the server looks like: data/ id#/ song1.mp3 song2. ...

"Python's loop feature allows for appending items to a zip file

Having some trouble with a Python function... I've got a function that, when I input a date, returns a column with 30 prices (one on each line) and names as the index. [in] getPrice('14/07/2015') [out] apple 10 pear 20 orange 12 banana 23 etc... ...