Add tool for migrating users from Gravatar to user avatars

(imported from commit e3fbeb74489952f00f9063303f4026ee6a7148fc)
This commit is contained in:
Zev Benjamin
2013-07-25 22:58:09 -04:00
committed by Tim Abbott
parent 91b05ffe88
commit f7b7f074e9
2 changed files with 49 additions and 3 deletions

View File

@@ -52,9 +52,8 @@ def upload_image_to_s3(
else:
headers = None
key.set_contents_from_filename(
user_file.temporary_file_path(),
headers=headers)
contents = user_file.read()
key.set_contents_from_string(contents, headers=headers)
def get_file_info(request, user_file):
uploaded_file_name = user_file.name