fixed book download, linux path is case sensitive

This commit is contained in:
TinyAtoms
2020-08-01 20:07:09 -03:00
parent ed03ea4a1c
commit 6a2f89d36e
4 changed files with 15 additions and 1 deletions

View File

@ -149,7 +149,7 @@ class BookDetailView(generic.DetailView):
pass
context["imgpath"] = context["object"].path + "/cover.jpg"
download = Data.objects.get(book=context["object"].id)
context["download"] = f"{context['object'].path}/{download.name}.{download.format}"
context["download"] = f"{context['object'].path}/{download.name}.{download.format.lower()}"
return context