@@ -36,22 +36,22 @@ The parameters that it takes are as follows:
36
36
37
37
``` typescript
38
38
{
39
- /**
40
- * Specify the specific media type that should be selected
41
- */
42
- mediaType : MediaType ;
43
- /**
44
- * Allow multiple images to be selected.
45
- */
46
- allowMultipleCapture ?: boolean ;
47
- /**
48
- * Max file size that can be uploaded.
49
- */
50
- maxSizePerFile ?: number ;
51
- /**
52
- * File formats supported for upload.
53
- */
54
- supportedFileFormats ?: string [];
39
+ /**
40
+ * Specify the specific media type that should be selected
41
+ */
42
+ mediaType : MediaType ;
43
+ /**
44
+ * Allow multiple images to be selected.
45
+ */
46
+ allowMultipleCapture ?: boolean ;
47
+ /**
48
+ * Max file size that can be uploaded.
49
+ */
50
+ maxSizePerFile ?: number ;
51
+ /**
52
+ * File formats supported for upload.
53
+ */
54
+ supportedFileFormats ?: string [];
55
55
}
56
56
```
57
57
@@ -63,72 +63,72 @@ You can take a look at [this tutorial](./MediaUploadTutorial.md) which goes over
63
63
64
64
In your template json file add the following action:
65
65
66
- ``` json
67
- "actions" : [
68
- {
69
- "type" : " VivaAction.SelectMedia" ,
70
- "id" : " Select Media" ,
71
- "title" : " Upload Image" ,
72
- "parameters" : {
73
- "mediaType" : " MediaType.Image"
74
- }
75
- }
76
- ]
77
- ```
66
+ ```json
67
+ "actions": [
68
+ {
69
+ "type": "VivaAction.SelectMedia",
70
+ "id": "Select Media",
71
+ "title": "Upload Image",
72
+ "parameters": {
73
+ "mediaType": "MediaType.Image"
74
+ }
75
+ }
76
+ ]
77
+ ```
78
78
79
79
1 . ** Upload multiple images**
80
80
81
- In your template json file add the following action:
81
+ In your template json file add the following action:
82
82
83
- ``` json
84
- "actions" : [
85
- {
86
- "type" : " VivaAction.SelectMedia" ,
87
- "id" : " Select Media" ,
88
- "title" : " Upload Image" ,
89
- "parameters" : {
90
- "mediaType" : " MediaType.Image" ,
91
- "allowMultipleCapture" : true
92
- }
93
- }
94
- ]
95
- ```
83
+ ``` json
84
+ "actions" : [
85
+ {
86
+ "type" : " VivaAction.SelectMedia" ,
87
+ "id" : " Select Media" ,
88
+ "title" : " Upload Image" ,
89
+ "parameters" : {
90
+ "mediaType" : " MediaType.Image" ,
91
+ "allowMultipleCapture" : true
92
+ }
93
+ }
94
+ ]
95
+ ```
96
96
97
97
1 . **Upload only JPG images**
98
98
99
- In your template json file add the following action:
99
+ In your template json file add the following action:
100
100
101
- ``` json
102
- "actions" : [
103
- {
104
- "type" : " VivaAction.SelectMedia" ,
105
- "id" : " Select Media" ,
106
- "title" : " Upload Image" ,
107
- "parameters" : {
108
- "mediaType" : " MediaType.Image" ,
109
- "supportedFileFormats" : " jpg"
110
- }
111
- }
112
- ]
113
- ```
101
+ ```json
102
+ "actions" : [
103
+ {
104
+ "type" : " VivaAction.SelectMedia" ,
105
+ "id" : " Select Media" ,
106
+ "title" : " Upload Image" ,
107
+ "parameters" : {
108
+ "mediaType" : " MediaType.Image" ,
109
+ "supportedFileFormats" : " jpg"
110
+ }
111
+ }
112
+ ]
113
+ ```
114
114
115
115
1 . **Upload allow only small images to be uploaded**
116
116
117
- In your template json file add the following action:
117
+ In your template json file add the following action:
118
118
119
- ``` json
120
- "actions" : [
121
- {
122
- "type" : " VivaAction.SelectMedia" ,
123
- "id" : " Select Media" ,
124
- "title" : " Upload Image" ,
125
- "parameters" : {
126
- "mediaType" : " MediaType.Image" ,
127
- "supportedFilemaxSizePerFileFormats" : 1000
128
- }
129
- }
130
- ]
131
- ```
119
+ ```json
120
+ "actions" : [
121
+ {
122
+ "type" : " VivaAction.SelectMedia" ,
123
+ "id" : " Select Media" ,
124
+ "title" : " Upload Image" ,
125
+ "parameters" : {
126
+ "mediaType" : " MediaType.Image" ,
127
+ "supportedFilemaxSizePerFileFormats" : 1000
128
+ }
129
+ }
130
+ ]
131
+ ```
132
132
133
133
### Access media upload action via card-designer card's property pane
134
134
0 commit comments