Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploadPart response appears to be double quoting ETag #17

Closed
isleshocky77 opened this issue Nov 22, 2012 · 3 comments
Closed

uploadPart response appears to be double quoting ETag #17

isleshocky77 opened this issue Nov 22, 2012 · 3 comments
Labels
guidance Question that needs advice or information.

Comments

@isleshocky77
Copy link

 $response = $s3->uploadPart(array(
                'Bucket'      => $awsConfig['bucket_name'],
                'Key'         => 'multipart_'.$Item->getFilename(),
                'Body'        => $body,
                'ContentMD5'  => hash_file('md5', $fullPath),
            ));
            $eTag = $response->getPath('ETag');
            $requestId = $response->getPath('RequestId');
            $this->log('Part Received with Etag: '.$etag.' and RequestId: ' .$requestId);
            var_dump($response);

Using that code my $eTag come out empty. If you look at the response it has

Part Received with Etag:  and RequestId: 4C8F395A88108EB7
object(Guzzle\Service\Resource\Model)#791 (2) {
  ["structure":protected]=>
  object(Guzzle\Service\Description\Parameter)#780 (25) {
// LEFT OUT
  }
  ["data":protected]=>
  array(3) {
    ["ServerSideEncryption"]=>
    string(0) ""
    ["ETag"]=>
    string(34) ""ad17daed6574002fcd5affc03226aece""
    ["RequestId"]=>
    string(16) "7D39349F6BC00BF3"
  }
}

Notice my RequestId was found, but the ETag is empty. I believe it's because it's double-quoted for some reason.

@jeremeamia
Copy link
Contributor

The var_dump() output looks correct. I did notice in your code sample though that you assign the variable as $eTag but then us a lowercase "t" when you reference it in the $this->log() call as $etag. Is that why it is not showing up?

@jeremeamia
Copy link
Contributor

@isleshocky77 Did there end up being a problem, or was it just a typo?

@isleshocky77
Copy link
Author

Yeah. Although I'm still having the issue with the signature error; it appears the double quotes does not effect finding it in the path and I'm able to get it on other returns.

@diehlaws diehlaws added guidance Question that needs advice or information. and removed no-issue labels Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants