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.
2 parents 7945896 + ae68666 commit fab7a71Copy full SHA for fab7a71
SnipeitPS/Private/Invoke-SnipeitMethod.ps1
@@ -61,11 +61,15 @@
61
ErrorAction = 'SilentlyContinue'
62
}
63
64
- #Place holder for intended image manipulation
+ # Place holder for intended image manipulation
65
# if and when snipe it API gets support for images
66
if($null -ne $body -and $Body.Keys -contains 'image' ){
67
if($PSVersionTable.PSVersion -ge '7.0'){
68
$Body['image'] = get-item $body['image']
69
+ # As multipart/form-data is always POST we need add
70
+ # requested method for laravel named as '_method'
71
+ $Body['_method'] = $Method
72
+ $splatParameters["Method"] = 'POST'
73
$splatParameters["Form"] = $Body
74
} else {
75
# use base64 encoded images for powershell version < 7
0 commit comments