我尝试在内存中创建一个Zip文件,将其他一些文件作为条目添加到归档中,并使用以下命令从WebAPI Controller返回它: // Create Zip Archive in; return StatusCode(500, "Error: Could not generate zip file");这确实会创建并返回一个Either this file is not
a <em
在ZipFilezipfile = new ZipFile("X");中设置压缩文件X的路径时遇到问题。我不想对路径进行硬编码,使其成为ZipFilezipfile = new ZipFile("C:/docs/data.zip");。我想做一些类似的事情:
ZipFilezipfile = new ZipFile(getServletContext().getReso
file = downloadFile() #This is api call that returns binary zip objectextractAll('/tmp/myZip.zip')def extractAll(self,source):
with zipfile.ZipFileRead-only file
我正在运行一个带有mongo数据库的web服务器。数据库存储记录,其中包括存储为base64编码字符串的图片。我正在编写一个api调用,它从记录中获取其中的几个映像,在.jpg映像中构建它们,并将它们添加到存储在服务器上的zip文件中。我遇到的问题是,在只记录了几条记录之后,调用就会返回一个OutOfMemory异常,即使图像的总大小小于10 of,每个映像的大小都在500 of左右。下面是我使用的代码:
using (ZipFilezipFile = new ZipFile())