arximughal / data-dead-drop

Simple, quick data sharing. For humans and machines 🤖

Home Page:https://www.datadeaddrop.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data Dead Drop

logo

Simple, secure file sharing. Data self-destroys after access.

Main License

Usage

Visit https://datadeaddrop.com to upload files, or upload files via the command line. For example using cURL:

curl https://datadeaddrop.com/upload \
  -X POST -H "Accept: application/json" \
  -F "upload[file]=@file.txt" -F "upload[expiry]=10" -F "upload[uses]=3"

Uploaded data will automatically be deleted after the specified number of minutes or uses. The maximum expiry is 60 minutes, and the maximum number of uses is 5. File size is limited to 1MB.

Data Dead drop will return a unique link generated using the Diceware algorithm method. Use this link to download the file in the browser or via the command line.

curl https://datadeaddrop.com/download/your-secret-key \
  -L -H "Accept: application/json" > "your-file.text"

API Documentation

Data Dead Drop's API is simple. If you want to build your own client use the /upload and /download endpoints.

Upload

// POST /upload
{
  "file":"file.txt",
  "expiry":10,
  "uses":1
}

A successful request will return status code 200 and the following payload:

{
  "name":"file.txt"
  "key":"your-secret-key",
  "url":"http://datadeaddrop/d/your-secret-key",
  "expiry":"2024-12-24T18:10:00.000Z",
  "uses":3,
  "created_at":"2023-12-24T18:00:00.000Z",
}

Download

# GET /download/your-secret-key

Development

This is a Ruby on Rails application. To get started, clone the repo, install dependencies and prepare the database. You'll also need to seed the database with a Diceware word list.

bundle install
rails db:setup
rake import:dice_words

The start the server with

rails server

Testing

Data Dead Drop uses RSpec for testing. Run the test suite with

bundle exec rspec

Deployment

Data Dead Drop is automatically deployed via GitHub actions using Kamal. To manually deploy you'll need SSH access to the server and access to the Docker Hub registry.

kamal setup
kamal deploy

About

Simple, quick data sharing. For humans and machines 🤖

https://www.datadeaddrop.com


Languages

Language:Ruby 53.5%Language:HTML 36.2%Language:JavaScript 5.8%Language:Shell 1.8%Language:Dockerfile 1.8%Language:CSS 0.9%