Skip to content

Instantly share code, notes, and snippets.

View RishabhVerma's full-sized avatar
🎯
Focusing

Rishabh Verma RishabhVerma

🎯
Focusing
  • New Delhi, India
View GitHub Profile
@RishabhVerma
RishabhVerma / Flask-Restful_S3_File_Upload.py
Last active November 3, 2021 01:41
Uploading a file to S3 while using Flask with Flask-Restful to create a REST API.
# -*- coding: utf-8 -*-
"""
An example flask application showing how to upload a file to S3
while creating a REST API using Flask-Restful.
Note: This method of uploading files is fine for smaller file sizes,
but uploads should be queued using something like celery for
larger ones.
"""
from cStringIO import StringIO