Skip to content

Commit

Permalink
fix: revert last changes, properly fix pandrora submit for DL file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Feb 14, 2025
1 parent 75c9bae commit f410b08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions website/web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,6 @@ def normalize_known_content(h: str, /, known_content: dict[str, Any], url: URLNo
'url_object': url,
}

if hasattr(url, 'downloaded_file') and url.downloaded_file:
url.add_feature('downloaded_file_hash', hashlib.sha512(url.downloaded_file.getvalue()).hexdigest())

if not url.empty_response:
# Index lookup
# %%% Full body %%%
Expand Down
2 changes: 1 addition & 1 deletion website/web/templates/hostname_popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ <h2 class="accordion-header">
<div>
{% if has_pandora %}
<div> Downloaded file: <b>{{url['url_object'].downloaded_filename}}</b> ({{sizeof_fmt(url['url_object'].downloaded_file.getbuffer().nbytes)}})</div>
{{ pandora_submit(tree_uuid, url['url_object'].uuid, url['url_object'].downloaded_file_hash) }}
{{ pandora_submit(tree_uuid) }}
{% else %}
<a href="{{ url_for('data', tree_uuid=tree_uuid)}}">
Download {{url['url_object'].downloaded_filename}}
Expand Down

0 comments on commit f410b08

Please sign in to comment.