Commit f35a9b0d authored by Lucas Carvalho's avatar Lucas Carvalho

Extract the correct file name from original url.

parent 382860ad
...@@ -113,8 +113,9 @@ def upload_network_cached(sha_cache, sha_dir, external_url, path, logger): ...@@ -113,8 +113,9 @@ def upload_network_cached(sha_cache, sha_dir, external_url, path, logger):
'Upload cache ignored, shacache or shadir was not provided!') 'Upload cache ignored, shacache or shadir was not provided!')
return False return False
file_name = external_url.split('/')[-1].split('#')[0].split('?')[0]
directory_key = get_directory_key(external_url) directory_key = get_directory_key(external_url)
kw = dict(file_name=os.path.basename(external_url), kw = dict(file=file_name,
urlmd5=hashlib.md5(external_url).hexdigest()) urlmd5=hashlib.md5(external_url).hexdigest())
f = open(path, 'r') f = open(path, 'r')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment