Skip to content

Commit ae5403d

Browse files
committed
Addressed PR comments
1 parent 0f3c223 commit ae5403d

File tree

2 files changed

+54
-52
lines changed

2 files changed

+54
-52
lines changed

docs/spfx/viva/get-started/actions/media-upload/MediaUploadDocumentation.md

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ This allows users to upload media content via an ACE. The current size limitatio
2626
The ACE action for Select Media is: `VivaAction.SelectMedia`.
2727

2828
The parameters that it takes are as follows:
29+
2930
- `mediaType`: This is set to image by default as audio is still under works.
3031
- `allowMultipleCapture` [OPTIONAL]: This enables multiple files to be added at once.
3132
- This is enabled by default.
@@ -35,24 +36,25 @@ The parameters that it takes are as follows:
3536

3637
```typescript
3738
{
38-
/**
39-
* Specify the specific media type that should be selected
40-
*/
41-
mediaType: MediaType;
42-
/**
43-
* Allow multiple images to be selected.
44-
*/
45-
allowMultipleCapture?: boolean;
46-
/**
47-
* Max file size that can be uploaded.
48-
*/
49-
maxSizePerFile?: number;
50-
/**
51-
* File formats supported for upload.
52-
*/
53-
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[];
5455
}
5556
```
57+
5658
### Tutorial and Examples
5759

5860
You can take a look at [this tutorial](./MediaUploadTutorial.md) which goes over a step by step guide on how to create a card with the available media upload action.
@@ -61,62 +63,62 @@ You can take a look at [this tutorial](./MediaUploadTutorial.md) which goes over
6163
In your template json file add the following action:
6264
```json
6365
"actions": [
64-
{
65-
"type": "VivaAction.SelectMedia",
66-
"id": "Select Media",
67-
"title": "Upload Image",
68-
"parameters": {
69-
"mediaType": "MediaType.Image"
70-
}
71-
}
66+
{
67+
"type": "VivaAction.SelectMedia",
68+
"id": "Select Media",
69+
"title": "Upload Image",
70+
"parameters": {
71+
"mediaType": "MediaType.Image"
72+
}
73+
}
7274
]
7375
```
7476

7577
1. **Upload multiple images**
7678
In your template json file add the following action:
7779
```json
7880
"actions": [
79-
{
80-
"type": "VivaAction.SelectMedia",
81-
"id": "Select Media",
82-
"title": "Upload Image",
83-
"parameters": {
84-
"mediaType": "MediaType.Image",
85-
"allowMultipleCapture": true
86-
}
87-
}
81+
{
82+
"type": "VivaAction.SelectMedia",
83+
"id": "Select Media",
84+
"title": "Upload Image",
85+
"parameters": {
86+
"mediaType": "MediaType.Image",
87+
"allowMultipleCapture": true
88+
}
89+
}
8890
]
8991
```
9092

9193
1. **Upload only JPG images**
9294
In your template json file add the following action:
9395
```json
9496
"actions": [
95-
{
96-
"type": "VivaAction.SelectMedia",
97-
"id": "Select Media",
98-
"title": "Upload Image",
99-
"parameters": {
100-
"mediaType": "MediaType.Image",
101-
"supportedFileFormats": "jpg"
102-
}
103-
}
97+
{
98+
"type": "VivaAction.SelectMedia",
99+
"id": "Select Media",
100+
"title": "Upload Image",
101+
"parameters": {
102+
"mediaType": "MediaType.Image",
103+
"supportedFileFormats": "jpg"
104+
}
105+
}
104106
]
105107
```
106108

107109
1. **Upload allow only small images to be uploaded**
108110
In your template json file add the following action:
109111
```json
110112
"actions": [
111-
{
112-
"type": "VivaAction.SelectMedia",
113-
"id": "Select Media",
114-
"title": "Upload Image",
115-
"parameters": {
116-
"mediaType": "MediaType.Image",
117-
"supportedFilemaxSizePerFileFormats": 1000
118-
}
119-
}
113+
{
114+
"type": "VivaAction.SelectMedia",
115+
"id": "Select Media",
116+
"title": "Upload Image",
117+
"parameters": {
118+
"mediaType": "MediaType.Image",
119+
"supportedFilemaxSizePerFileFormats": 1000
120+
}
121+
}
120122
]
121123
```
122124

docs/spfx/viva/get-started/actions/media-upload/MediaUploadTutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Next, in the `onInit` function, change `this.state={}` to
210210

211211
```typescript
212212
this.state = {
213-
filesUploaded: ''
213+
filesUploaded: ''
214214
};
215215
```
216216

0 commit comments

Comments
 (0)