Skip to content

Commit

Permalink
Merge branch 'main' into fix-response
Browse files Browse the repository at this point in the history
  • Loading branch information
VictoriqueMoe authored Jun 4, 2024
2 parents 8a7baae + 5bb4622 commit c894771
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 c894771

Please sign in to comment.