mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-10 06:15:18 +00:00
More visibility into attached files and duplicate status (#776)
This commit is contained in:
parent
73227963dd
commit
be1c8ba060
2 changed files with 33 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
import hashlib
|
||||
import os
|
||||
import tempfile
|
||||
import zipfile
|
||||
|
@ -86,3 +87,12 @@ def get_number_of_files_in_directory(directory: Path, recursive: bool = False) -
|
|||
break
|
||||
count += len(files)
|
||||
return count
|
||||
|
||||
|
||||
def calculate_sha256(file_path: str) -> str:
|
||||
"""Helper function to calculate SHA256 hash of a file."""
|
||||
sha256_hash = hashlib.sha256()
|
||||
with open(file_path, "rb") as f:
|
||||
for byte_block in iter(lambda: f.read(4096), b""):
|
||||
sha256_hash.update(byte_block)
|
||||
return sha256_hash.hexdigest()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue