ShareFile-PowerShell icon indicating copy to clipboard operation
ShareFile-PowerShell copied to clipboard

There is an error in UploadLocalFiles.ps1

Open martin-morin opened this issue 5 years ago • 0 comments

A variable rename was missed

Current code:

#upload directory is relative to the root of the account
#get the current user's home folder to use as the starting point
$ShareFileHomeFolder = (Send-SfRequest $sfClient -Entity Items).Url

#use the local My Documents folder as source
$LocalPath = (Join-Path $env:USERPROFILE "Documents")

#Create a PowerShell provider for ShareFile at the location specified
New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\" -RootUri $ShareFilePath

The line: New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\" -RootUri $ShareFilePath

Should be changed for: New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\" -RootUri $ShareFileHomeFolder

martin-morin avatar Nov 17 '20 16:11 martin-morin