Skip to content

Commit

Permalink
Merge pull request #151 from weddleben/examples
Browse files Browse the repository at this point in the history
f strings not needed
  • Loading branch information
nakedmcse authored May 18, 2024
2 parents 404c9e2 + 7bb6919 commit 5bb4622
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/public/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -418,20 +418,20 @@ import io
# upload file
upload_file = waifuvault.FileUpload("./files/aCoolFile.png")
upload_res = waifuvault.upload_file(upload_file)
print(f"{upload_res.url}")
print(upload_res.url)

# upload via URL
upload_file = waifuvault.FileUpload("https://waifuvault.moe/assets/custom/images/08.png")
upload_res = waifuvault.upload_file(upload_file)
print(f"{upload_res.url}")
print(upload_res.url)

# upload a buffer
with open("./files/aCoolFile.png", "rb") as fh:
buf = io.BytesIO(fh.read())

upload_file = waifuvault.FileUpload(buf, "aCoolFile.png")
upload_res = waifuvault.upload_file(upload_file)
print(f"{upload_res.url}")
print(upload_res.url)
</code>
</pre>
</div>
Expand Down

0 comments on commit 5bb4622

Please sign in to comment.