Skip to content

Commit

Permalink
Fixed uploading bigger files to the remote AV
Browse files Browse the repository at this point in the history
  • Loading branch information
kam193 committed Jan 2, 2025
1 parent b075e5e commit d3f225e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion remoteav/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0
1
4 changes: 3 additions & 1 deletion remoteav/service/al_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def execute(self, request: ServiceRequest) -> None:
if request.file_size > self.max_file_size:
return

av_response = requests.post(f"{self.url}/scan-file", files={"file": request.file_contents})
av_response = requests.post(
f"{self.url}/scan-file", files={"file": open(request.file_path, "rb")}, stream=True
)
av_response.raise_for_status()

av_result = av_response.json()
Expand Down

0 comments on commit d3f225e

Please sign in to comment.