I try to upload images using Invoke-RestMethod from powershell
When i try to POST to PHP from remote server i don't receive any answer from PHP.
Here is my code from powershell:
> function uploadAPI($uri, $file, $api)
> {
> $result = Invoke-RestMethod -Uri $uri -Method Post -InFile $file -ContentType "multipart/form-data"
> Write-Output $result
> Break Script
>
> }
>
> uploadAPI "http://192.168.1.59:8888/api/" "C:\source\italian-landscape-mountains-nature.jpg" "w"
and here is the code from PHP
> print_r([$_FILES, $_POST, $_REQUEST]);
>
> die;
The response is empty:
> Array (
> [0] => Array
> (
> )
>
> [1] => Array
> (
> )
>
> [2] => Array
> (
> )
>
> )