Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
#29 Integrated `django-storages`
  • Loading branch information
null-none committed Nov 26, 2020
1 parent a357266 commit e7a0b4c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion smartfields/processors/base.py
@@ -1,5 +1,6 @@
import subprocess, time
from six.moves import queue
from django.conf import settings

from smartfields.utils import NamedTemporaryFile, AsynchronousFileReader, \
ProcessingError, deconstructible, get_model_name
Expand Down Expand Up @@ -88,7 +89,10 @@ def __eq__(self, other):
self.cmd_template == other.cmd_template

def get_input_path(self, in_file):
return in_file.path
if settings.DEFAULT_FILE_STORAGE == 'django.core.files.storage.FileSystemStorage':
return in_file.path
else:
return in_file.instance.file.url

def get_output_path(self, out_file):
return out_file.name
Expand Down

0 comments on commit e7a0b4c

Please sign in to comment.