We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 126ef9a + 636fdf0 commit bea820aCopy full SHA for bea820a
1 file changed
README.md
@@ -272,6 +272,19 @@ Future<void> deleteComment({@required int id}) async {
272
}
273
```
274
275
+### 16. Upload Media
276
+
277
+```dart
278
+ uploadMedia(File image) async {
279
+ var media = await wordPress.uploadMedia(image).then((m) {
280
+ print('Media uploaded successfully: $m');
281
+ }).catchError((err) {
282
+ print('Failed to upload Media: $err');
283
+ });
284
+ int mediaID = media['id'];
285
+}
286
+```
287
288
## Future Work
289
290
1. Implementing OAuth 2.0 authentication.
@@ -281,3 +294,4 @@ Future<void> deleteComment({@required int id}) async {
294
- [Sachin Ganesh](https://github.com/SachinGanesh)
295
- [Harm-Jan Roskam](https://github.com/harmjanr)
296
- [Yahya Makarim](https://github.com/ymakarim)
297
+- [Garv Maggu](https://github.com/GarvMaggu)
0 commit comments