Coder Social home page Coder Social logo

s3-upload-presign-url's Introduction

s3-upload-presign-url

Usage:

docker run -ti -v $HOME/.aws:/root/.aws -e S3_BUCKET=<S3_UPLOAD_BUCKET_NAME> -e S3_KEY=<S3_OBJECT_KEY_NAME> -e EXPIRES_IN=<EXPIRES_IN_SECONDS> pahud/s3-presign-upload-url

Example:

$ docker run -ti -v $HOME/.aws:/root/.aws -e S3_BUCKET=pahud-demo-us-west-2 -e S3_KEY=100M -e EXPIRES_IN=600 pahud/s3-presign-upload-url

> [email protected] start /app
> node index.js

https://pahud-demo-us-west-2.s3.amazonaws.com/100M?AWSAccessKeyId=AKIAI3CALFU43GAFC6DA&Expires=1524625153&Signature=8c%2Fy2daM%2FlL60sDZ9%2Fzck2IZK6M%3D

For China Beijing region, you need to specify the region code: AWS_REGION='cn-north-1'

$ docker run -ti -v $HOME/.aws:/root/.aws -e S3_BUCKET=pahud-bjs -e S3_KEY=100M -e EXPIRES_IN=120 -e AWS_PROFILE=bjs -e AWS_REGION='cn-north-1' pahud/s3-presign-upload-url

> [email protected] start /app
> node index.js

https://pahud-bjs.s3.cn-north-1.amazonaws.com.cn/100M?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAOEVQOGI2VHQNTNHA%2F20180425%2Fcn-north-1%2Fs3%2Faws4_request&X-Amz-Date=20180425T031701Z&X-Amz-Expires=120&X-Amz-Signature=403250e7afea49504781d9b932168312124e55ecb66b0acbdcb7cdc6dc452ff1&X-Amz-SignedHeaders=host

Upload with cURL

Simple upload local file with cURL like this:

$ curl -T ./100M 'https://pahud-demo-us-west-2.s3.amazonaws.com/100M?AWSAccessKeyId=AKIAI3CALFU43GAFC6DA&Expires=1524626910&Signature=cZkdmk57MwrsZGrl5BNrT%2Ft%2B3Z0%3D' > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  9  100M    0     0    9  9.8M      0  1475k  0:01:09  0:00:06  0:01:03 1940k

s3-upload-presign-url's People

Contributors

pahud avatar

Watchers

ChenChihChiang avatar  avatar

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.