Skip to content

A file management service written in go, it categorizes objects into files and folders, it provides secure, signed URLs for downloading and viewing files, caches URLs for quicker access

Notifications You must be signed in to change notification settings

KailasMahavarkar/file_service

Repository files navigation

S3 File Listing Service

This service provides an API endpoint to list files in an Amazon S3 bucket.

Improvements made over vanilla s3 api:

  • instead of object, we are listing objects as either files or folder (which is what we see in file explorer).
  • signed url for download and view file content.
  • URL caching
  • Pagination

Getting Started

To get started with this service, follow the steps below.

Prerequisites

  • Go (1.16 or higher)
  • Amazon Web Services (AWS) account with S3 access

Installation

  1. Clone the repository:
git clone https://github.com/KailasMahavarkar/file_service.git
  1. Change into the project directory:
cd file_service
  1. Install the dependencies:
go mod download
  1. Configure the service: Create a configuration file named config.json in the project root and populate it with the necessary configuration parameters:
BUCKET_NAME=your-s3-bucket-name
REGION=ap-south-1
DOWNLOAD_URL_TIME_LIMIT=300
PAGINATION_PAGE_SIZE=100
AWS_ACCESS_KEY_ID=your-aws-access-key-id
AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key

Usage

To run the service, execute the following command:

go run main.go

About

A file management service written in go, it categorizes objects into files and folders, it provides secure, signed URLs for downloading and viewing files, caches URLs for quicker access

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published