Giter Site home page Giter Site logo

lmammino / s3-presigned-urls-examples Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 3.0 79 KB

Code examples on how to generate and use S3 pre-signed URLs using the JavaScript SDK v3

Home Page: https://fourtheorem.com/the-illustrated-guide-to-s3-pre-signed-urls/

License: MIT License

JavaScript 100.00%
amazon amazon-web-services aws aws-s3 code-examples code-snippets examples javascript node node-js

s3-presigned-urls-examples's Introduction

s3-presigned-urls-examples

Code examples on how to generate and use S3 pre-signed URLs using the JavaScript SDK v3.

These examples are being used in the following resources (which are highly recommended to fully appreciate the topic):

Examples

The examples folder contains several examples of how to generate S3 pre-signed URLs for some of the most common use cases.

Get a file from a bucket

/examples/get.js

Showcases how to create a pre-signed URL that can be used to give temporary access to a private file stored in an S3 bucket.

Upload a file to a bucket using the PUT method

/examples/put.js

Showcases how to create a pre-signed URL that can be used to upload an object into an S3 bucket using the PUT method.

Upload a file to a bucket using the POST method (with curl)

/examples/post.js

Showcases how to create a pre-signed URL that can be used to upload an object into an S3 bucket using the POST method (using Curl).

Upload a file to a bucket using the POST method (with a web form)

/examples/post-from.js

Showcases how to create a pre-signed URL that can be used to upload an object into an S3 bucket using the POST method (using a web form).

Upload a file to a bucket using the POST method (using client-side JavaScript a.k.a. AJAX)

/examples/post-from-ajax.js

Showcases how to create a pre-signed URL that can be used to upload an object into an S3 bucket using the POST method (using a web form and client-side JavaScript).

Listing all buckets

/examples/list-buckets.js

Showcases how to create a pre-signed URL that can be used to list all the buckets in the signer account.

Listing objects in a bucket

/examples/list-objects.js

Showcases how to create a pre-signed URL that can be used to list all the objects in a given bucket.

Deleting an object

/examples/delete-object.js

Showcases how to create a pre-signed URL that can be used to delete a given object from a bucket.

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.

s3-presigned-urls-examples's People

Contributors

lmammino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

s3-presigned-urls-examples's Issues

Add a link to the article

I recommend adding a link to your article (The illustrated guide to S3 pre-signed URLs) in the repository's README. It contains a ton of useful information and explanations related to the code examples and would definitely be useful to anyone who stumbles upon the repo, but is not aware that the article exists.

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.