misc: give profile images a .jpeg extension (#27645)
This makes sure nginx will serve them with a correct MIME type.
This commit is contained in:
parent
90ff2d46ab
commit
ace8072025
|
@ -125,7 +125,7 @@ def profile_image_serialize(uploadedfile):
|
|||
h_computation.update(chunk)
|
||||
hexdigest = h_computation.hexdigest()
|
||||
stored_file = default_storage.save(
|
||||
os.path.join('profile-image', hexdigest),
|
||||
os.path.join('profile-image', hexdigest + '.jpeg'),
|
||||
uploadedfile)
|
||||
return stored_file
|
||||
|
||||
|
|
|
@ -411,6 +411,7 @@ def test_profile_image(db, app, admin, mailoutbox, media):
|
|||
response = form.submit()
|
||||
assert john().attributes.cityscape_image
|
||||
profile_filename = john().attributes.cityscape_image.name
|
||||
assert profile_filename.endswith('.jpeg')
|
||||
|
||||
# verify API serves absolute URL for profile images
|
||||
app.authorization = ('Basic', (admin.username, admin.username))
|
||||
|
|
Loading…
Reference in New Issue