Add request IP to get_direct_download_url method

This commit is contained in:
Joseph Schorr 2017-09-25 17:14:28 -04:00
parent ad61df66c5
commit 56fbbcf7cf
8 changed files with 13 additions and 11 deletions

View file

@ -107,7 +107,8 @@ class DelegateUserfiles(object):
def get_file_url(self, file_id, expires_in=300, requires_cors=False):
path = self.get_file_id_path(file_id)
url = self._storage.get_direct_download_url(self._locations, path, expires_in, requires_cors)
url = self._storage.get_direct_download_url(self._locations, path, request.remote_addr, expires_in,
requires_cors)
if url is None:
if self._handler_name is None: