Upload precompiled letter pdfs to letters-scan bucket

This commit is contained in:
Ken Tsang
2018-03-13 14:08:34 +00:00
parent 30e371fa4c
commit 8733d84e75
3 changed files with 43 additions and 1 deletions

View File

@@ -64,6 +64,11 @@ def upload_letter_pdf(notification, pdf_data, is_test_letter=False):
else:
bucket_name = current_app.config['LETTERS_PDF_BUCKET_NAME']
if notification.template.is_precompiled_letter:
bucket_name = current_app.config['LETTERS_SCAN_BUCKET_NAME']
else:
bucket_name = current_app.config['LETTERS_PDF_BUCKET_NAME']
s3upload(
filedata=pdf_data,
region=current_app.config['AWS_REGION'],