Coder Social home page Coder Social logo

aws_s3_client's People

Contributors

idrats avatar moshoujingli avatar mymikemiller avatar rikkycrawler avatar

Stargazers

 avatar  avatar

Watchers

 avatar

aws_s3_client's Issues

Delete file

Can you provide an example of how to delete S3 file/?

during bucket.listContents: Failed assertion: boolean expression must not be null

When I try to run listContents on one of my buckets, I get an error complaining about the boolean at the end of the function being null. This is because isTruncated is potentially not initialized by the time the comparison is made. This can be resolved by initializing isTruncated to false.

I don't known of a workaround that doesn't involve changing your code.

The error:

Unhandled exception:
Failed assertion: boolean expression must not be null
#0      Bucket.listContent (package:aws_s3_client/src/bucket.dart:103:11)
<asynchronous suspension>

Unable to upload to Archive.org: InvalidAccessKeyId

I'm trying to upload to Archive.org. I've verified that the access/secret keys are correctly copied from here (when logged in): https://archive.org/account/s3.php.

I can list the contents of my bucket successfully, even if I use a fake access key. That's expected because the buckets are all public.

But when I try to upload, I get the following error:

DOException { statusCode: 403, reasonPhrase: "Forbidden", responseBody: "<?xml version='1.0' encoding='UTF-8'?>
<Error><Code>InvalidAccessKeyId</Code><Message>The AWS Access Key Id you provided does not exist in our records.</Message><Resource /><RequestId>3cb1b592-9b7c-444b-9bda-1bc540878241</RequestId></Error>" }

I know that your code is getting the correct access key, as I can see it being used in the credential here: https://github.com/idrats/aws_s3_client/blob/master/lib/src/client.dart#L249

These are the headers your library sends with the request here:

key:"x-amz-acl"
value:List (1 item)
[0]:"public-read"

key:"content-length"
value:List (1 item)
[0]:"21240"

key:"content-type"
value:List (1 item)
[0]:"video/mp4"

key:"x-amz-date"
value:List (1 item)
[0]:"20200915T214408Z"

key:"x-amz-content-sha256"
value:List (1 item)
[0]:"0b1fe85677bffe44d88b35fc4a96a90ff48194397ac17ef563ede0fce47c1a1c"

key:"authorization"
value:List (1 item)
[0]:"AWS4-HMAC-SHA256 Credential=[my access key]/20200915/us-west-1/s3/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-acl;x-amz-content-sha256;x-amz-date, Signature=[a 64 character hash]"

Do you know why I'm getting InvalidAccessKeyId even though I'm using a valid access key? Is your library compatible with archive.org's s3-like api?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.