Skip to content

Commit e98f2ae

Browse files
committed
Make use of the new secure_url parameter for the ger_serving_url function of the Images API.
1 parent 12ca7c4 commit e98f2ae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

server/gae-python/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# jQuery File Upload Plugin GAE Python Example 1.1.3
3+
# jQuery File Upload Plugin GAE Python Example 1.1.4
44
# https://github.com/blueimp/jQuery-File-Upload
55
#
66
# Copyright 2011, Sebastian Tschan
@@ -84,7 +84,11 @@ def handle_upload(self):
8484
'/?key=' + urllib.quote(blob_key, '')
8585
if (IMAGE_TYPES.match(result['type'])):
8686
try:
87-
result['url'] = images.get_serving_url(blob_key)
87+
result['url'] = images.get_serving_url(
88+
blob_key,
89+
secure_url=self.request.host_url\
90+
.startswith('https')
91+
)
8892
result['thumbnail_url'] = result['url'] +\
8993
THUMBNAIL_MODIFICATOR
9094
except: # Could not get an image serving url

0 commit comments

Comments
 (0)