make use of default_storage.url to get URL for cover

pull/1/head
Raymond Yee 2014-02-01 15:47:37 -08:00
parent a3a47cabd4
commit b5eccac247
1 changed files with 1 additions and 1 deletions

View File

@ -553,7 +553,7 @@ def new_edition(request, work_id, edition_id, by=None):
file.write(cover_file.read()) file.write(cover_file.read())
file.close() file.close()
#and put its url into cover_image #and put its url into cover_image
edition.cover_image = 'https://%s.s3.amazonaws.com%s' % (settings.AWS_STORAGE_BUCKET_NAME , cover_file_name) edition.cover_image = default_storage.url(cover_file_name)
edition.save() edition.save()
return HttpResponseRedirect(work_url) return HttpResponseRedirect(work_url)
else: else: