mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
Upload precompiled letter pdfs to letters-scan bucket
This commit is contained in:
@@ -451,7 +451,7 @@ class Sandbox(CloudFoundryConfig):
|
||||
TEST_LETTERS_BUCKET_NAME = 'cf-sandbox-test-letters'
|
||||
DVLA_RESPONSE_BUCKET_NAME = 'notify.works-ftp'
|
||||
LETTERS_PDF_BUCKET_NAME = 'cf-sandbox-letters-pdf'
|
||||
LETTERS_SCAN_BUCKET_NAME = 'cf-sandbox-virus-check-pdf'
|
||||
LETTERS_SCAN_BUCKET_NAME = 'cf-sandbox-letters-scan'
|
||||
FROM_NUMBER = 'sandbox'
|
||||
REDIS_ENABLED = False
|
||||
|
||||
|
||||
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user