I was testing the following example to upload a .zip file and found that the file is uploaded as 0kb and saved on desired location.
the upload works fine for other file types e.g text , image
New-UDUpload -Text 'Upload Image' -OnUpload {
$Data = $Body | ConvertFrom-Json
$bytes = [System.Convert]::FromBase64String($Data.Data)
[System.IO.File]::WriteAllBytes("$env:temp\$($Data.Name)", $bytes)
}
is there a specific instructions on how to upload zip files kindly provide an example.
Thank you.
Product: PowerShell Universal
Version: 1.5.15