s3_presined_url

command module
v0.0.0-...-20383cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

S3 Presigned URL Generator for Backblaze B2

This tool is a Go application that generates presigned URLs for all objects in a specified Backblaze B2 bucket. The presigned URLs allow you to download objects securely and are written to a presigned_urls.txt file.

Features

  • Generate Presigned URLs: Creates presigned URLs for all objects or objects with a specific prefix in a Backblaze B2 bucket.
  • Customizable URL Expiration: Set the expiration time for the presigned URLs.
  • Environment Configuration: Uses a .env file to manage configuration and credentials securely.
  • Support for Object Prefixes: Optionally generate URLs for objects with a specific prefix.

Prerequisites

  • Go Language: You need to have Go installed (version 1.16 or higher recommended).
  • Backblaze B2 Account: A Backblaze B2 account with an application key and key ID.

Installation

  1. Clone the Repository:
git clone https://github.com/JasonL111/S3_presigned_URL.git
cd S3_presigned_URL
  1. Install dependencies go mod tidy

Usage

  1. Prepare the .env file: Create a .env file in the root directory of the project. Example::
    B2_KEY_ID=your-key-id
    B2_APPLICATION_KEY=your-application-key
    B2_ENDPOINT=endpoint
    B2_REGION=region
    B2_BUCKET_NAME=your-bucket-name
    PREFIX=optional-prefix
    
  2. Run the program: go run main.go

Dependencies

License

This project is licensed under the Apache2.0 License. See the LICENSE file for details. Code base on https://github.com/awsdocs/aws-doc-sdk-examples, under Apache2.0 License, read NOTICE.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL