New-UDUpload is not working for .zip files

Hi Adam,

Thanks for the latest release to fix the limitations on file size. I tried a 2.5GB file and unfortunately it still didn’t work. The Exception states

‘The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.’

Have you experienced this? The code is below:

New-UDUpload -Text ‘Upload File’ -OnUpload {

                    $Data = $Body | ConvertFrom-Json 
                    $Dir = 'C:\'
                    $bytes = [System.Convert]::FromBase64String($Data.Data)
                    $filename = $Data.Name
                    [System.IO.File]::WriteAllBytes("$Dir\$filename", $bytes)
                    if (Test-Path -Path "$Dir$filename") {
                        Show-UDToast -Message "Upload Success..." -MessageColor Green -Title $($Body.Name) -Position topCenter -Duration 6000
                    }

I’m running version 2.8.3

Thanks in advanced.

Hey Rich,

Can you please try this syntax instead? It should avoid having to do any serialization since it’s a large file.

New-UDUpload -Text ‘Upload File’ -OnUpload {
      $Bytes = $EventData.RawData
                    $Dir = 'C:\'
                    $filename = $EventData.Name
                    [System.IO.File]::WriteAllBytes("$Dir\$filename", $bytes)
                    if (Test-Path -Path "$Dir$filename") {
                        Show-UDToast -Message "Upload Success..." -MessageColor Green -Title $($Body.Name) -Position topCenter -Duration 6000
                    }

Hi Adam,

Appreciate your quick response! I tested the above but unfortunately it gets ‘stuck’ on the process bar at about 10% on a 2.5GB file.

Based on my experience with testing this against 2.8.3 today, the hard limit of 2GB is still in effect.

I raised feature request #1010 to suggest a workaround.

Hi all,

I was wondering perhaps whether there has been an update on this?