File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ We are going to upload a new file to the server using upload method.
119
119
#### Delete file
120
120
121
121
Syntax : ` $storage.delete(string) `
122
+ Return : ` Promise `
122
123
123
124
You can delete a file with ` delete ` method specifying the file path.
124
125
@@ -141,14 +142,11 @@ You can delete a file with `delete` method specifying the file path.
141
142
},
142
143
methods: {
143
144
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 )
152
150
})
153
151
}
154
152
}
You can’t perform that action at this time.
0 commit comments