DEV Community

Cover image for Frago – A Django App for Secure, Resumable, Parallel Chunked Uploads
Albin Mathew
Albin Mathew

Posted on

Frago – A Django App for Secure, Resumable, Parallel Chunked Uploads

Uploading large files in Django can be tricky — especially when you're dealing with drone videos, media files, or IoT data streams. That's why I built Frago, a Django package designed to make file uploads resumable, parallel, and pluggable.

💡 Why I Built Frago

During one of my projects, I needed to handle large video uploads from drones. The connection was unreliable, and uploading entire files in a single request was slow and error-prone. I wanted:

Resumable uploads in case of failure

Parallel chunk uploads for speed

Checksum validation to ensure integrity

A way to plug into Django's auth system and signals
Enter fullscreen mode Exit fullscreen mode

None of the existing solutions were flexible enough, so I created Frago.

🎯 What Frago Does

Frago is a reusable Django app for handling secure, resumable, and parallel chunked uploads. It tracks uploads at the chunk level, supports checksum validation, and can be extended to fit your use case.

⚙️ Features

✅ Resumable uploads (supports network interruptions)
✅ Parallel chunk uploads
✅ Checksum validation (MD5, SHA256, etc.)
✅ Upload status tracking with database models
✅ Django signals for hooks (start, chunk received, completed, failed)
✅ Auth modes: anonymous, user
✅ Customizable upload models and storage paths
✅ Built-in cleanup for expired or completed uploads

📦 Install & Setup

pip install frago

settings.py

INSTALLED_APPS = [
...
"frago",
]

Then migrate:

python manage.py migrate frago

🧩 Example API Usage

Start an upload:

POST /upload/
{
"filename": "video.mp4",
"total_size": 104857600
}

Upload a chunk:

PUT /upload/{upload_id}/
Headers: Content-Range: bytes 0-1048575/104857600

Complete the upload:

POST /upload/{upload_id}/
{
"checksum": "md5-checksum",
"checksum_algo": "md5"
}

🤖 Client Script Included

I’ve written a Python-based async client uploader using httpx, aiofiles, and asyncio. It supports:

Parallel file uploads

Chunk-level resume

Folder scanning

Upload tracking
Enter fullscreen mode Exit fullscreen mode

📁 Client source:
🔗 GitHub › Frago › https://github.com/Albinm123/frago-client

🔧 Customization

You can override the upload view to:

Use JWT or device-based auth

Use your own upload model

Customize how identifiers are resolved (get_identifier())

Enter fullscreen mode Exit fullscreen mode




🔐 Security Features


Verifies chunk range (via Content-Range)

Optional checksum validation (enabled via setting)

Expiration support to clean up stale uploads

JWT/device/user auth plug-in options

Enter fullscreen mode Exit fullscreen mode




📄 License

MIT License — Free to use and extend.

🔗 Links

🔧 GitHub: https://github.com/Albinm123/frago

📦 PyPI: https://pypi.org/project/frago/

🛠 Docs: GitHub README

Enter fullscreen mode Exit fullscreen mode




🙌 Feedback & Contributions

If you have ideas, feedback, or find issues, please open a GitHub Issue or submit a PR!

Thanks for checking it out ❤️

Top comments (0)