Storage/src/StorageObject.php
public function signedUploadUrl($expires, array $options = [])
    {
        $options += [
            'headers' => []
        ];

        $options['headers']['x-goog-resumable'] = 'start';

        unset(
            $options['cname'],
            $options['saveAsName'],
            $options['responseDisposition'],
            $options['responseType']
        );

        return $this->signedUrl($expires, [
            'method' => 'POST',
            'allowPost' => true
        ] + $options);
    }
public function signedUploadUrl($expires, array $options = [])
    {
        $options += [
            'headers' => []
        ];

        $options['headers']['x-goog-resumable'] = 'start';

        unset(
            $options['cname'],
            $options['saveAsName'],
            $options['responseDisposition'],
            $options['responseType']
        );

        return $this->signedUrl($expires, [
            'method' => 'POST',
            'allowPost' => true
        ] + $options);
    }
public function signedUploadUrl ( $ expires , array $ options = [ ] ) { $ options += [ 'headers' => [ ] ] ; $ options [ 'headers' ] [ 'x-goog-resumable' ] = 'start' ; unset ( $ options [ 'cname' ] , $ options [ 'saveAsName' ] , $ options [ 'responseDisposition' ] , $ options [ 'responseType' ] ) ; return $ this -> signedUrl ( $ expires , [ 'method' => 'POST' , 'allowPost' => true ] + $ options ) ; }
Create a Signed Upload URL for this object.

This method differs from {@see Google\Cloud\Storage\StorageObject::signedUrl()}
in that it allows you to initiate a new resumable upload session. This
can be used to allow non-authenticated users to insert an object into a
bucket.

In order to upload data, a session URI must be
obtained by sending an HTTP POST request to the URL returned from this
method. See the [Cloud Storage Documentation](https://goo.gl/b1ZiZm) for
more information.

If you prefer to skip this initial step, you may find
{@see Google\Cloud\Storage\StorageObject::beginSignedUploadSession()} to
fit your needs. Note that `beginSignedUploadSession()` cannot be used
with Google Cloud PHP's Signed URL Uploader, and does not support a
configurable expiration date.

Example:
```
$url = $object->signedUploadUrl(new \DateTime('tomorrow'));
```

```
// Use Signed URLs v4
$url = $object->signedUploadUrl(new \DateTime('tomorrow'), [
'version' => 'v4'
]);
```

@param Timestamp|\DateTimeInterface|int $expires Specifies when the URL
will expire. May provide an instance of {@see Google\Cloud\Core\Timestamp},
[http://php.net/datetimeimmutable](`\DateTimeImmutable`), or a
UNIX timestamp as an integer.
@param array $options {
Configuration Options.

@type string $cname The CNAME for the bucket, for instance
`https://cdn.example.com`. **Defaults to**
`https://storage.googleapis.com`.
@type string $contentMd5 The MD5 digest value in base64. If you
provide this, the client must provide this HTTP header with
this same value in its request. If provided, take care to
always provide this value as a base64 encoded string.
@type string $contentType If you provide this value, the client must
provide this HTTP header set to the same value.
@type bool $forceOpenssl If true, OpenSSL will be used regardless of
whether phpseclib is available. **Defaults to** `false`.
@type array $headers If additional headers are provided, the server
will check to make sure that the client provides matching
values. Provide headers as a key/value array, where the key is
the header name, and the value is an array of header values.
Headers with multiple  values may provide values as a simple
array, or a comma-separated string. For a reference of allowed
headers, see [Reference Headers](https://cloud.google.com/storage/docs/xml-api/reference-headers).
Header values will be trimmed of leading and trailing spaces,
multiple spaces within values will be collapsed to a single
space, and line breaks will be replaced by an empty string.
V2 Signed URLs may not provide `x-goog-encryption-key` or
`x-goog-encryption-key-sha256` headers.
@type array $keyFile Keyfile data to use in place of the keyfile with
which the client was constructed. If `$options.keyFilePath` is
set, this option is ignored.
@type string $keyFilePath A path to a valid Keyfile to use in place
of the keyfile with which the client was constructed.
@type string $responseDisposition The
[`response-content-disposition`](http://www.iana.org/assignments/cont-disp/cont-disp.xhtml)
parameter of the signed url.
@type string $responseType The `response-content-type` parameter of the
signed url. When the server contentType is `null`, this option
may be used to control the content type of the response.
@type string $saveAsName The filename to prompt the user to save the
file as when the signed url is accessed. This is ignored if
`$options.responseDisposition` is set.
@type string|array $scopes One or more authentication scopes to be
used with a key file. This option is ignored unless
`$options.keyFile` or `$options.keyFilePath` is set.
@type array $queryParams Additional query parameters to be included
as part of the signed URL query string. For allowed values,
see [Reference Headers](https://cloud.google.com/storage/docs/xml-api/reference-headers#query).
@type string $version One of "v2" or "v4". **Defaults to** `"v2"`.
}
@return string
Create a Signed Upload URL for this object .