Skip to content

Commit

Permalink
fix download file names
Browse files Browse the repository at this point in the history
  • Loading branch information
luto committed Nov 2, 2024
1 parent 5ae189d commit 7d91bd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crowdprinter/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class ServeFileView(View):
def get(self, *args, **kwargs):
path = self.get_file_path(**kwargs)
ext = os.path.splitext(path)[1]
dl_filename = f'{settings.DOWNLOAD_FILE_PREFIX}_{kwargs["slug"]}.{ext}'
dl_filename = f'{settings.DOWNLOAD_FILE_PREFIX}_{kwargs["slug"]}{ext}'
return FileResponse(
open(path, mode="rb"),
as_attachment=self.as_attachment,
Expand Down

0 comments on commit 7d91bd2

Please sign in to comment.