Skip to content

A temporary, encrypted file sharing service written in Elixir.

Notifications You must be signed in to change notification settings

eldelto/temporary

Repository files navigation

Temporary

A temporary, encrypted file sharing service.

Introduction

Summary of the core functionality used by Temporary.

File Upload

Temporary uses the following flow to encrypt and upload your files:

  1. Create a random 16 byte UUID and 8 Byte password
  2. Encrypt the filename using AES
  3. Call the backend to create a new chunked file with the given filename
  4. Split the file into chunks (currently 0.25 MB)
  5. For each chunk
    1. Encode each chunk in Base64
    2. Encrypt it using the generated password and AES
    3. Upload the file to the backend
  6. Commit the file on the backend (mark upload as done)

Chunker Implementation

Temporary uses chunker to deal with files in chunks.

The Mnesia based implementation can be found in storable.ex.

File Cleanup

Uploaded files are stored in Mnesia for a limited amount of time (currently 3 days).

For the cleanup a scheduled process (cleanup.ex) runs every 5 minutes to check for old files and deletes them.

Getting Started

git clone https://github.com/eldelto/temporary.git

cd temporary 

// Start development server
mix phx.server

// Build Docker image
./docker_build.sh

To-Do

  • Implement chunked upload
    • Server
    • Client
  • Implement chunked download
    • Server
    • Client
  • Prevent download of uncommitted chunked files
  • Clean up job for chunked files
  • Upload view
    • Progress bar
    • Custom error toasts
    • Counter
    • Copy link
  • Download view
    • Counter
    • Download button
    • Custom error toasts
    • File not found page
  • Version number
  • Use CSS variables
  • Add tests
  • Use custom exceptions in error tuple
  • Add type specs
  • Use web worker for encryption?
  • Review encryption

Screens

Upload View

Download View

About

A temporary, encrypted file sharing service written in Elixir.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published