/home/techb158/immovalet.com/vendor/aws/aws-sdk-php/src/S3
NameSizeModeActions
Crypto/-0755rm
Exception/-0755rm
RegionalEndpoint/-0755rm
UseArnRegion/-0755rm
AmbiguousSuccessParser.php22800644editdlrm
ApplyChecksumMiddleware.php19040644editdlrm
BatchDelete.php75810644editdlrm
BucketEndpointArnMiddleware.php118720644editdlrm
BucketEndpointMiddleware.php19140644editdlrm
EndpointRegionHelperTrait.php38780644editdlrm
GetBucketLocationParser.php13200644editdlrm
MultipartCopy.php69340644editdlrm
MultipartUploader.php61160644editdlrm
MultipartUploadingTrait.php39510644editdlrm
ObjectCopier.php57700644editdlrm
ObjectUploader.php51460644editdlrm
PermanentRedirectMiddleware.php17420644editdlrm
PostObject.php39270644editdlrm
PostObjectV4.php54300644editdlrm
PutObjectUrlMiddleware.php15690644editdlrm
RetryableMalformedResponseParser.php14530644editdlrm
S3Client.php429670644editdlrm
S3ClientInterface.php123290644editdlrm
S3ClientTrait.php84990644editdlrm
S3EndpointMiddleware.php114620644editdlrm
S3MultiRegionClient.php196430644editdlrm
S3UriParser.php50270644editdlrm
SSECMiddleware.php22890644editdlrm
StreamWrapper.php305980644editdlrm
Transfer.php151620644editdlrm
Edit: /home/techb158/immovalet.com/vendor/aws/aws-sdk-php/src/S3/PostObject.php (3927B)
client = $client; $this->bucket = $bucket; if (is_array($jsonPolicy)) { $jsonPolicy = json_encode($jsonPolicy); } $this->jsonPolicy = $jsonPolicy; $this->formAttributes = [ 'action' => $this->generateUri(), 'method' => 'POST', 'enctype' => 'multipart/form-data' ]; $this->formInputs = $formInputs + ['key' => '${filename}']; $credentials = $client->getCredentials()->wait(); $this->formInputs += $this->getPolicyAndSignature($credentials); } /** * Gets the S3 client. * * @return S3ClientInterface */ public function getClient() { return $this->client; } /** * Gets the bucket name. * * @return string */ public function getBucket() { return $this->bucket; } /** * Gets the form attributes as an array. * * @return array */ public function getFormAttributes() { return $this->formAttributes; } /** * Set a form attribute. * * @param string $attribute Form attribute to set. * @param string $value Value to set. */ public function setFormAttribute($attribute, $value) { $this->formAttributes[$attribute] = $value; } /** * Gets the form inputs as an array. * * @return array */ public function getFormInputs() { return $this->formInputs; } /** * Set a form input. * * @param string $field Field name to set * @param string $value Value to set. */ public function setFormInput($field, $value) { $this->formInputs[$field] = $value; } /** * Gets the raw JSON policy. * * @return string */ public function getJsonPolicy() { return $this->jsonPolicy; } private function generateUri() { $uri = new Uri($this->client->getEndpoint()); if ($this->client->getConfig('use_path_style_endpoint') === true || ($uri->getScheme() === 'https' && strpos($this->bucket, '.') !== false) ) { // Use path-style URLs $uri = $uri->withPath("/{$this->bucket}"); } else { // Use virtual-style URLs $uri = $uri->withHost($this->bucket . '.' . $uri->getHost()); } return (string) $uri; } protected function getPolicyAndSignature(CredentialsInterface $creds) { $jsonPolicy64 = base64_encode($this->jsonPolicy); return [ 'AWSAccessKeyId' => $creds->getAccessKeyId(), 'policy' => $jsonPolicy64, 'signature' => base64_encode(hash_hmac( 'sha1', $jsonPolicy64, $creds->getSecretKey(), true )) ]; } }