mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 15:38:24 -04:00
Pass original file name when sending contact list
Otherwise the new file doesn’t get a name, which is very confusing.
This commit is contained in:
@@ -76,17 +76,15 @@ class ContactList(JSONModel):
|
||||
bucket=ContactList.get_bucket_name(),
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def copy_to_uploads(service_id, upload_id):
|
||||
contents = ContactList.download(service_id, upload_id)
|
||||
metadata = ContactList.get_metadata(service_id, upload_id)
|
||||
def copy_to_uploads(self):
|
||||
metadata = self.get_metadata(self.service_id, self.id)
|
||||
new_upload_id = s3upload(
|
||||
service_id,
|
||||
{'data': contents},
|
||||
self.service_id,
|
||||
{'data': self.contents},
|
||||
current_app.config['AWS_REGION'],
|
||||
)
|
||||
set_metadata_on_csv_upload(
|
||||
service_id,
|
||||
self.service_id,
|
||||
new_upload_id,
|
||||
**metadata,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user