Giter VIP home page Giter VIP logo

bucket3's Introduction

bucket3

bucket3 is a simple image hosting service that implements browser-based uploads to Amazon S3. Images are uploaded directly to Amazon's server without proxying through bucket3 service first.

The S3 object key is derived from the SHA-256 digest of the file and is guaranteed to be unique. As such, new uploads won't overwrite previous files.

The service is dead-simple with no database and no built-in authentication. It is not recommended to expose the service to the general public without any authentication layer.

screenshot

Prerequisites

  • Create an S3 bucket example-bucket.
  • Put a domain example.org in front of the bucket (e.g. with CloudFront) so that https://example.org/foo.png returns foo.png in the bucket.

Setup

# Install the package
pipx install git+https://github.com/wzyboy/bucket3

# Configure the web server
export BUCKET3_DOMAIN=example.org
export BUCKET3_BUCKET=example-bucket

# Configure AWS credentials if needed.
# IAM permissions required: s3:GetObject + s3:PutObject
# https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
#export AWS_ACCESS_KEY_ID=AKIA...
#export AWS_SECRET_ACCESS_KEY=...

# Start the web server (localhost:5333)
bucket3-web

It is also possible to use bucket3 command to upload via CLI without starting the web server.

Special Thanks

Most of the frontend code is written by ChatGPT.

bucket3's People

Contributors

wzyboy avatar

Watchers

 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.