Type Definitions
DownloadConfig
- Source:
Properties:
Name | Type | Description |
---|---|---|
data |
string | Object | Downloaded data. Required. |
name |
string | Name of downloaded data. Optional. Default - "file" |
type |
string | Type of downloaded data. Optional. Default - "text/plain" |
event |
string | Event that triggers downloading. Optional. Default - "click" |
onDownloaded |
function | Function is called after successful downloading. Optional |
onError |
function | Function is called after failed downloading. Optional |
Downloading config
DownloadFn(config) → {Promise.<void>}
- Source:
Function to download file
Parameters:
Name | Type | Description |
---|---|---|
config |
ManualDownloadConfig | Manual downloading config |
Returns:
Promises resolves after downloading file.
- Type
- Promise.<void>
DownloadManager
- Source:
Properties:
Name | Type | Description |
---|---|---|
downloader |
DownloadRefContainer | Object for inserting to html element. |
download |
DownloadFn | Function to download file. |
Object to manage downloading files
DownloadRefContainer
- Source:
Properties:
Name | Type | Description |
---|---|---|
ref |
MutableRefObject.<HTMLElement> | Reference to html element. |
Object for inserting to html element
Type:
- Object
ManualDownloadConfig
- Source:
Properties:
Name | Type | Description |
---|---|---|
data |
string | Object | Downloaded data. Required. |
name |
string | Name of downloaded data. Optional. Default - "file" |
type |
string | Type of downloaded data. Optional. Default - "text/plain" |
Manual downloading config
SpecificDownloadConfig
- Source:
Properties:
Name | Type | Description |
---|---|---|
data |
string | Object | Downloaded data. Required. |
name |
string | Name of downloaded data. Optional. Default - "file" |
event |
string | Event that triggers downloading. Optional. Default - "click" |
Specific downloading config
SpecificDownloadFn(config) → {Promise.<void>}
- Source:
Specific function to download file
Parameters:
Name | Type | Description |
---|---|---|
config |
SpecificManualDownloadConfig | Specific manual downloading config |
Returns:
Promises resolves after downloading file.
- Type
- Promise.<void>
SpecificDownloadManager
- Source:
Properties:
Name | Type | Description |
---|---|---|
downloader |
DownloadRefContainer | Object for inserting to html element. |
download |
SpecificDownloadFn | Specific function to download file. |
Specific object to manage downloading files
SpecificManualDownloadConfig
- Source:
Properties:
Name | Type | Description |
---|---|---|
data |
string | Object | Downloaded data. Required. |
name |
string | Name of downloaded data. Optional. Default - "file" |
Specific manual downloading config
SpecificUploadConfig
- Source:
Properties:
Name | Type | Description |
---|---|---|
isMultiple |
boolean | Indicator for count of uploaded files. Optional. Default - true |
maxFiles |
number | Limit for maximum selected files. Optional. |
maxSize |
number | Limit for maximum size of file. Optional. Default - 5242880 bytes (5MB) |
Specific uploading config
UploadConfig
- Source:
Properties:
Name | Type | Description |
---|---|---|
onSelectFile |
function | Function is called after uploading with uploaded file. Required |
onError |
function | Function is called after failed downloading. Optional |
isMultiple |
boolean | Indicator for count of uploaded files. Optional. Default - true |
maxFiles |
number | Limit for maximum selected files. Optional. |
maxSize |
number | Limit for maximum size of file. Optional. Default - 5242880 bytes (5MB) |
validTypes |
Array.<string> | Set of valid types for files. Optional. |
Uploading config
UploadManager
- Source:
Properties:
Name | Type | Description |
---|---|---|
uploader |
UploadRefContainer | Object for inserting to html element. |
reset |
function | Function to reset value of input. |
Object to manage uploading files
UploadRefContainer
- Source:
Properties:
Name | Type | Description |
---|---|---|
ref |
MutableRefObject.<HTMLInputElement> | Reference to html element. |
Object for inserting to html element