You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/upload/chunk-upload.md
+163-5Lines changed: 163 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,30 +10,43 @@ position: 3
10
10
11
11
# Chunk Upload
12
12
13
-
Chunk upload enables file uploads by dividing the file into smaller parts (chunks) and sending them in multiple requests to the remote endpoint, where they are reassembled into the final file.
13
+
Chunk upload works by splitting a file into smaller parts (chunks) and sending them in multiple requests. These chunks are then reassembled at the remote endpoint into the final file.
14
14
15
15
## Basics
16
16
17
-
To setup the feature, use the `UploadChunkSettings` tag, which is nested inside `UploadSettings`. The tag includes the following parameters:
17
+
To set up the Chunk upload feature, use the `UploadChunkSettings` tag, which is nested inside `UploadSettings`. The tag includes the following parameters:
18
18
19
19
| Parameter | Type and Default Value | Description |
20
20
|----------|----------|----------|
21
21
| `AutoRetryAfter` | `double` <br/> (100) | Specifies the amount of time in milliseconds after which a failed chunk upload request will be retried.
22
22
| `Enabled` | `bool` <br/> (`true`) | Specifies if the chunk upload is enabled.
23
23
| `MaxAutoRetries` | `int` <br/> (1) | Specifies the number of attempts to retry uploading a failed chunk.
24
24
| `MetadataField` | `string` <br/> (`chunkMetadata`) | Specifies the name of the variable that will receive the chunk upload metadata in the remote endpoint.
25
-
| `Resumable` | `bool` <br/> (`true`) | Specifies if the file upload process could be paused and later resumed.
25
+
| `Resumable` | `bool` <br/> (`true`) | Specifies if the file upload process can be paused and later resumed.
26
26
| `Size` | `double` <br/> (1024 * 1024) | The size of the chunks in bytes.
27
27
28
28
## Events
29
29
30
30
The Upload exposes several relevant events. You can find related examples in the [Events](slug:upload-events) article.
31
31
32
-
*`OnPause` - fires when the user clicks on the pause button during chunk upload.
33
-
*`PageSizeChanged` - fires when the user clicks on the "resume" button during chunk upload.
32
+
*`OnPause`—fires when the user clicks on the pause button during chunk upload.
33
+
*`OnResume`—fires when the user clicks on the "resume" button during chunk upload.
34
+
35
+
## Example
36
+
37
+
The `UploadController` class below assumes that the project name and namespace is `TelerikBlazorApp`.
38
+
39
+
Make sure to enable controller routing in the app startup file (`Program.cs`). In this case, `app.MapDefaultControllerRoute();` is all that's needed.
0 commit comments