Add files to existing zip inside a blob storage [Stream is not seekable] #701
-
I'm trying to create an azure function to receive a list of file urls and add them directly to a single zip file stored into a blob storage.
The problem occurs when adding more files to existing zip blob. When I try to initialize the ZipFile class with the stream it throws the exception 'Stream is not seekable'. Version of SharpZipLib
Obtained from
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yeah, to update a zip file, you need to make changes to already written data, hence the seeking. The way the zip format works it's not possible to do what you are trying to do. Either you have to store the blob inside a buffer ( |
Beta Was this translation helpful? Give feedback.
Yeah, to update a zip file, you need to make changes to already written data, hence the seeking. The way the zip format works it's not possible to do what you are trying to do. Either you have to store the blob inside a buffer (
MemoryStream
), update it, and then write the new zipfile to the blob, or use another format (like tar).