bugfix url upload
This commit is contained in:
parent
4d736eb913
commit
8025ce338c
|
@ -3,6 +3,7 @@
|
|||
A file hosting service similar to Pomf and Uguu but without the public nature.
|
||||
"""
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import string
|
||||
import random
|
||||
|
@ -197,7 +198,7 @@ def download_file(url, timeout=10, max_file_size=config.client_max_size):
|
|||
|
||||
if r.headers.get('Content-Disposition'):
|
||||
fname = re.search(r'filename="(.+)"',
|
||||
r.headers['content-disposition'])
|
||||
r.headers['content-disposition']).group(1)
|
||||
else:
|
||||
fname = os.path.basename(url)
|
||||
return (fname, temp)
|
||||
|
|
Loading…
Reference in New Issue
Block a user