client->createPresignedUrl($this->prepare(), $expires); } /** * {@inheritdoc} */ protected function process() { $request = $this->getRequest(); $response = $this->getResponse(); // Dispatch an error if a 301 redirect occurred if ($response->getStatusCode() == 301) { $this->getClient()->getEventDispatcher()->dispatch('request.error', new Event(array( 'request' => $this->getRequest(), 'response' => $response ))); } parent::process(); // Set the GetObject URL if using the PutObject operation if ($this->result instanceof Model && $this->getName() == 'PutObject') { $this->result->set('ObjectURL', $request->getUrl()); } } }