Browser Crashes when uploading a large number of files using the Patch My PC Cloud portal
Last updated
Was this helpful?
Last updated
Was this helpful?
Applies to: Patch My PC Cloud
I have a folder named "MyFolder" that contains 3,000 files, totaling 3GB. This folder needs to be available in the cache folder alongside the installer during installation.
However, when I try uploading these files to a Custom App or as Extra Files for a deployment using the Patch My PC (PMPC) portal, my browser crashes.
When too many concurrent worker operations occur during file uploads to either Custom Apps or even as Extra Files for a deployment, the browser's performance is significantly impacted, leading to freezing and eventual crashing.
This is due to inherent limitations and is not related to the PMPC Cloud Portal but rather to browser performance constraints.
To mitigate this, PMPC has limited the number of files that can be uploaded at once to 1,000.
If you try to upload more than 1000 files at once, the upload will fail with the error message
You have selected too many files (available: 1000)
If you need to upload more than 1,000 files in one go, we recommend using the following workaround to compress them into a ZIP file and upload just this ZIP file as an Extra File.
Then, when you deploy the app, you can configure a Pre-Installation script using the example below to extract the files.
Consider the scenario mentioned above, where you have a folder named "MyFolder" containing 3,000 files totaling 3GB. This folder should be available in the cache folder alongside the installer during installation.
Use the following PowerShell script to create a ZIP file. In this example, the folder to be compressed is located at C:\Temp\MyFolder
Define the path to the folder you want to compress
$sourceFolderPath = "C:\temp\MyFolder"
Define the path where the zip archive should be created
$zipFilePath = "C:\Temp\MyFolder.zip"
Create the zip archive
Compress-Archive -Path $sourceFolderPath -DestinationPath $zipFilePath -Force -ErrorAction 'Stop'
After running this script, a file named C:\Temp\MyFolder.zip will be created.
Create your Custom App or upload the ZIP archive as an Extra File in a deployment.
During the app deployment step, specify a script to extract the ZIP archive in the same folder. The script below uses the $PSScriptRoot automatic variable to determine the correct extraction path.
# Define the path to the zip file
$zipFilePath = Join-Path -Path $PSScriptRoot -ChildPath 'MyFolder.zip'
# Define the destination path
$destinationPath = $PSScriptRoot
# Extract the ZIP archive
Expand-Archive -Path $zipFilePath -DestinationPath $destinationPath -Force -ErrorAction 'Stop'
Upload the extraction script as a Pre-Install Script in your deployment settings.
Finalize your deployment configuration.
Test the deployment on a few machines before rolling it out to production.
By following these steps, you can successfully upload and deploy apps containing a large number of files without encountering browser crashes.