Fixes: 1) Correct file path lookup for digital assets in download logic;
Extra: Adjusted logic to ensure compatibility with `digital_asset.path`.
This commit is contained in:
parent
10351e4576
commit
9b47f6dd7b
1 changed files with 1 additions and 1 deletions
|
|
@ -482,7 +482,7 @@ def download_digital_asset_view(request, *args, **kwargs):
|
||||||
download.num_downloads += 1
|
download.num_downloads += 1
|
||||||
download.save()
|
download.save()
|
||||||
|
|
||||||
file_path = download.order_product.product.stocks.first().digital_asset.file.path
|
file_path = download.order_product.product.stocks.first().digital_asset.path
|
||||||
|
|
||||||
content_type, encoding = mimetypes.guess_type(file_path)
|
content_type, encoding = mimetypes.guess_type(file_path)
|
||||||
if not content_type:
|
if not content_type:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue