upload requested files
This commit is contained in:
parent
37ed99d029
commit
8535f961ec
3 changed files with 28 additions and 5 deletions
|
|
@ -144,7 +144,8 @@ class File(models.Model):
|
|||
data = models.FileField(null=True, blank=True, upload_to=lambda f, x: file_path(f, 'data.raw'))
|
||||
|
||||
def contents(self):
|
||||
if self.data:
|
||||
if self.data != None:
|
||||
self.data.seek(0)
|
||||
return self.data.read()
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue