CloudConvert\Process::upload PHP Method

upload() public method

Uploads the input file. See https://cloudconvert.com/apidoc#upload
public upload ( $stream, string $filename = null ) : Process
$filename string Filename of the input file
return Process
    public function upload($stream, $filename = null)
    {
        if (!isset($this->upload->url)) {
            throw new Exceptions\ApiException("Upload is not allowed in this process state", 400);
        }
        if (empty($filename)) {
            $metadata = stream_get_meta_data($stream);
            $filename = basename($metadata['uri']);
        }
        $this->api->put($this->upload->url . "/" . rawurlencode($filename), $stream, false);
        return $this;
    }