Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswilson1982 authored Sep 12, 2024
1 parent 675d3ff commit 7104b06
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@ def update():
fp = TemporaryFile()
im.save(fp, extension) # save(fp, "PNG")

file_size = os.fstat(fp.fileno()).st_size
sftp.putfo(fp, remote_path, file_size=file_size) # confirm=False
fp.close()
with open(fp, "rb") as temp:
temp.seek(0)
size = temp.tell()
sftp.putfo(temp, remote_path, file_size=size)

# im.save(path, optimize=True, quality=90)

Expand Down

0 comments on commit 7104b06

Please sign in to comment.