We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ad93e9 commit b32da21Copy full SHA for b32da21
Slack.Backup/Private/backup/Invoke-FilesBackup.ps1
@@ -23,12 +23,13 @@ function Invoke-FilesBackup {
23
$start = Convert-DateToEpoch (Get-Date "2000-01-01")
24
}
25
26
- $files = Get-FilesList -Token $key -TsFrom $start
+ $files = Get-FilesList -Token $Token -TsFrom $start
27
if ($files.ok) {
28
foreach ($f in $files | Select-Object -ExpandProperty files) {
29
$ext = $f.filetype
30
$path = "$backupLoc/$($f.id)"
31
- Get-SlackFile -Token $key -Uri $f.url_private | Set-Content "$path.$ext" -AsByteStream
+ $slackFile = Get-SlackFile -Token $Token -Uri $f.url_private
32
+ [System.IO.File]::WriteAllBytes("$path.$ext", $slackFile)
33
$f | ConvertTo-Json -Depth 10 | Set-Content -Path "$path.json"
34
35
0 commit comments