imgdmp

Curl

curl -i -X POST -H "Authorization: Bearer mybearer" -F "image=@myimage.png" http://imgdmp.apps.priotas.eu/upload

HTTPie

http -f http://imgdmp.apps.priotas.eu/upload Authorization:"Bearer mybearer" image@myimage.png

Guzzle (PHP)

  
    // Image expires in 14 days from now
    $client = new \GuzzleHttp\Client();                                                                                  
    $fileHandle = fopen('myimage.png', 'r');                                                                                               
    $response = $client->request('POST', 'http://imgdmp.apps.priotas.eu/upload', [                                                                    
        'multipart' => [                                                                                                                      
            [                                                                                                                                 
                'name'     => 'image',                                                                                                        
                'contents' => $fileHandle,                                                                                    
            ],
            [
                'name'     => 'expires',
                'contents' => date('Y-m-d', strtotime("+14 days"))
            ]                                                                                                                               
        ],                                                                                                                                    
        'headers' => ['Authorization' => 'Bearer mybearer']                                                            
    ]);