Skip to content

Commit a18a962

Browse files
committed
udpate storage.md (delete file API)
1 parent 19424c3 commit a18a962

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

docs/storage.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ We are going to upload a new file to the server using upload method.
119119
#### Delete file
120120

121121
Syntax : `$storage.delete(string)`
122+
Return : `Promise`
122123

123124
You can delete a file with `delete` method specifying the file path.
124125

@@ -141,14 +142,11 @@ You can delete a file with `delete` method specifying the file path.
141142
},
142143
methods: {
143144
delete() {
144-
this.$storage.delete({
145-
ref: this.file,
146-
result: () => {
147-
console.log("Deleted")
148-
},
149-
error: (error) => {
150-
console.log(error.message)
151-
}
145+
this.$storage.delete(this.file)
146+
.then(() => {
147+
console.log("Deleted")
148+
}).catch((error) => {
149+
console.log(error.message)
152150
})
153151
}
154152
}

0 commit comments

Comments
 (0)