Build job does not have a request context when calling get_file_url
We therefore need to specify some sort of IP or get_file_url will attempt to get it from context
This commit is contained in:
parent
3bef21253d
commit
2ce4e49711
6 changed files with 12 additions and 8 deletions
|
@ -105,9 +105,9 @@ class DelegateUserfiles(object):
|
|||
content_encoding)
|
||||
return file_id
|
||||
|
||||
def get_file_url(self, file_id, expires_in=300, requires_cors=False):
|
||||
def get_file_url(self, file_id, remote_ip, expires_in=300, requires_cors=False):
|
||||
path = self.get_file_id_path(file_id)
|
||||
url = self._storage.get_direct_download_url(self._locations, path, request.remote_addr, expires_in,
|
||||
url = self._storage.get_direct_download_url(self._locations, path, remote_ip, expires_in,
|
||||
requires_cors)
|
||||
|
||||
if url is None:
|
||||
|
|
Reference in a new issue