Solution for larger npm packages

Continuing the discussion from Publishing large package to custom registry:

For uploading larger packages to a npm repository like an artifactory or something a put command can be executed instead of npm publish, which does a normal binary upload, example in PowerShell:

- npm pack
- | #Because unity packages tend to be larger than usual, we upload them manually instead with "npm publish", because publish is encoding it to base64 which can not handle such long strings and causing an error "string too long"
  $headers = @{"Authorization" = "Bearer $env:NPM_TOKEN"}
  Invoke-RestMethod -Uri "http://$env:NPM_UPLOAD_PATH_UNITY_PACKAGES/$($PACKAGE_JSON.name)/-/$($PACKAGE_JSON.name)-$($PACKAGE_JSON.version).tgz" -Method Put -InFile ".\$($PACKAGE_JSON.name)-$($PACKAGE_JSON.version).tgz" -Headers $headers

Maybe its a help for someone or me in future.
I wanted to reply to a existing topic with the same issue but it was already closed without a solution.