Skip to content

Instantly share code, notes, and snippets.

View mzughbor's full-sized avatar
🎯
Focusing

Mahmoud Zuhgbor mzughbor

🎯
Focusing
View GitHub Profile
@RyanBalfanz
RyanBalfanz / upload.py
Last active January 8, 2025 00:45
[Heroku] Direct to S3 File Uploads in Python
"""
Fix for some issues with the original code from Heroku:
https://devcenter.heroku.com/articles/s3-upload-python
This example is also designed for use with Django, not Flask as in the original.
"""
import base64
import hashlib
import hmac