Skip to content

Commit

Permalink
Add a delete method to the R2 storage adapter (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
blittle committed Mar 21, 2023
1 parent b063cfd commit 1c37d48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-falcons-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"superflare": patch
---

Add a delete method to the R2 storage adapter
4 changes: 4 additions & 0 deletions packages/superflare/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class Storage {
return this.disk.binding.get(key);
}

delete(key: string) {
return this.disk.binding.delete(key);
}

put(file: File) {
const extension = file.name.split(".").pop();
const hash = crypto.randomUUID();
Expand Down

0 comments on commit 1c37d48

Please sign in to comment.