Skip to content

Instantly share code, notes, and snippets.

@theju
theju / dropbox_upload_handler.py
Created Jul 17, 2012
Upload files to dropbox from your django app
View dropbox_upload_handler.py
from django.core.files.uploadhandler import TemporaryFileUploadHandler
from django.core.files.base import File
from dropbox.client import DropboxClient
from dropbox.session import DropboxSession
from django.conf import settings
import os
class DropboxFileUploadHandler(TemporaryFileUploadHandler):
def __init__(self, *args, **kwargs):
super(DropboxFileUploadHandler, self).__init__(*args, **kwargs)