Closed null-none closed 3 years ago
To be honest with you, I am not that fond of the proposed solution, it is great however that you identified the place where the fix is needed. I don't like this solution for a very simple reason, it will silently break behavior for every user that specifies custom class for default storage. For example if user's storage is some derivative of django.core.files.storage.FileSystemStorage
that requires local full path, all of a sudden their code will break. I think a better solution would be an opt-in mixin:
class CloudExternalFileProcessorMixin(object):
def get_input_path(self, in_file):
return in_file.instance.file.url
Then the user can use such mixing to opt-in into a different behavior with:
class CloudFFMEGPRocessor(CloudExternalFileProcessorMixin, FFMPEGProcessor):
pass
Another solution that I think might be even better is to give ability to override this method at construction time. Could you try out this PR #31 and see if it solves the problem that you are experiencing?
@lehins My PR isn't perfect, I agree. I just showed how you can solve the problem. I check PR the mixin version today and write to you.
29 Integrated
django-storages