rotsee/protokollen — pull request #3 by staffanm (2014-10-23 19:05:03+00:00)
Title: Alternate storage backends

This PR implements support for alternate storage backends. The backend to use is selected by modifying the imports in settings.py. By default the S3Uploader is used.

Two alternate storage backends are included: one using local file storage (upload.LocalUploader), and another using the Dropbox API (upload.DropboxUploader). These require different configuration, details are in the docstrings for those classes.

The goal was to change existing APIs and client code as little as possible. The Uploader interface has a few new added methods (getNextFile, getFile) to allow downloading (these methods were previously called on a s3.S3Connection object directly). getNextFile and getFile returns objects which are S3-specific, but alternate implementations returns compatible objects.