Skip to content
Snippets Groups Projects
Commit e2334f5d authored by Daniel Neuwirth's avatar Daniel Neuwirth
Browse files

first stage

parent 44b99489
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,8 @@ def create_thumbnail_from_file(file, old_filename):
if os.path.exists(old_filepath):
os.remove(old_filepath)
convert_from_bytes(file_read,
size=(width, None),
dpi = 50,
#size=(width, None),
output_folder=directory,
output_file=filename,
single_file=True,
......@@ -81,7 +82,11 @@ def create_thumbnail_from_file(file, old_filename):
def create_thumbnail_from_url(resource, old_filename):
return False, None, None
resource_url = resource.get('url')
response = urllib2.urlopen(resource_url)
if response.code == 200:
file = response.read()
return False, None
'''
# Requests does not work on a server but on a local test enviroment.
# With the given configuration of a wsgi server and apache it did not work
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment