diff options
| author | Dev Box | 2010-11-08 17:20:14 -0700 |
|---|---|---|
| committer | Dev Box | 2010-11-08 17:20:14 -0700 |
| commit | 3d03ea6a85a3d324087019601bd933fa0319a103 (patch) | |
| tree | 04b739dccd5122b9f161643491c9fe96aec3eb22 | |
| parent | f293632e59af67cacd3c6b41c688e6ef29c469db (diff) | |
| download | amazons3-py-3d03ea6a85a3d324087019601bd933fa0319a103.tar.gz amazons3-py-3d03ea6a85a3d324087019601bd933fa0319a103.zip | |
Added checking for uploading
| -rw-r--r-- | django/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/django/__init__.py b/django/__init__.py index 2ae3040..3e57e15 100644 --- a/django/__init__.py +++ b/django/__init__.py | |||
| @@ -77,7 +77,11 @@ class S3Storage(Storage): | |||
| 77 | 77 | ||
| 78 | def _save(self, filename, content): | 78 | def _save(self, filename, content): |
| 79 | # a stupid hack | 79 | # a stupid hack |
| 80 | content = content.file | 80 | try: |
| 81 | content.url = self.url | ||
| 82 | except AttributeError, e: | ||
| 83 | content = content.file | ||
| 84 | |||
| 81 | try: | 85 | try: |
| 82 | data = content.read() | 86 | data = content.read() |
| 83 | except IOError, err: | 87 | except IOError, err: |