Skip to content

Commit a62e269

Browse files
Update New-HuduUpload.ps1
Updated Get-Item to use -LiteralPath instead of -Path and added exception if file not found
1 parent 836f6a0 commit a62e269

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

HuduAPI/Public/New-HuduUpload.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ function New-HuduUpload {
3434
[string]$uploadable_type
3535
)
3636

37-
$File = Get-Item $FilePath
37+
$File = Get-Item -LiteralPath $FilePath
38+
if (-not $File) { throw "File not found!" }
3839

3940
$form = @{
4041
file = $File

0 commit comments

Comments
 (0)