Created
March 28, 2022 18:36
-
-
Save jvanhoesen/aea403982933d60be75570a6e9338c9c to your computer and use it in GitHub Desktop.
Open existing .Zip file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Retrieving .ZIP file attached to Acumatica document | |
PX.SM.FileInfo fileInfo = uploadFileMaint.GetFile(zipFile); | |
if(fileInfo != null) | |
{ | |
//Create a new memory stream from .ZIP file data | |
using (MemoryStream stream = new MemoryStream(fileInfo.BinData)) | |
{ | |
//Create new instance of ZipArchive to interact with .ZIP file | |
using (ZipArchive zip = ZipArchive.CreateFrom(stream, true)) | |
{ | |
//Code to read and process contents of .ZIP | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment