Skip to content

Commit

Permalink
Changed response file name to layer name
Browse files Browse the repository at this point in the history
  • Loading branch information
watucker committed Nov 7, 2019
1 parent 613c04e commit 22bf0a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cdm_interface/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@ def get(self, request, index=None):
file_like_object.getvalue(),
content_type='application/x-zip-compressed'
)
response_file_name = 'results.zip'
response_file_name = f'{self.layer_name}.zip'

else:

response = HttpResponse(
format_data(data, output_format.output_method),
content_type=output_format.content_type
)
response_file_name = f'results.{output_format.file_extension}'
response_file_name = \
f'{self.layer_name}.{output_format.file_extension}'

content_disposition = f'attachment; filename="{response_file_name}"'
response['Content-Disposition'] = content_disposition
Expand Down

0 comments on commit 22bf0a8

Please sign in to comment.