core/file-picker/file-picker.component.ts
User can upload a binary directly or use an URL.
OnInit
selector | c8y-file-picker |
templateUrl | ./file-picker.component.html |
Properties |
Methods |
Inputs |
Outputs |
config |
Type : FilePickerConfig
|
Default value : { maxlength: 2048 }
|
fileBinary |
Type : DroppedFile
|
filePickerIndex |
Type : number
|
Used only when displaying multiple file pickers in the same view. |
fileUrl |
Type : string
|
fileUrlPopover |
Type : string
|
Additional string to be displayed in a popover. |
maxAllowedFiles |
Type : any
|
Default value : Infinity
|
uploadChoice |
Type : "uploadBinary" | "uploadUrl"
|
Default value : 'uploadBinary'
|
onFilesPicked |
Type : EventEmitter<PickedFiles>
|
clearInputFromUrl |
clearInputFromUrl()
|
Triggered when user changes upload choice, from upload url to upload binary.
Returns :
void
|
clearSelectedFiles |
clearSelectedFiles()
|
Triggered when user changes upload choice, to avoid cumulation of droppedFiles.
Returns :
void
|
isPopoverUsed |
isPopoverUsed()
|
Checks if there is popover to display.
Returns :
boolean
|
onFileDropped | ||||||
onFileDropped(droppedFiles: DroppedFile[])
|
||||||
Triggered by dropped file in component and pass it into drop-area component.
Parameters :
Returns :
void
|
onFileUrlChange | ||||
onFileUrlChange(urlStr)
|
||||
Triggered when user puts binary's url to upload.
Parameters :
Returns :
void
|
dropArea |
Type : DropAreaComponent
|
Decorators :
@ViewChild(DropAreaComponent, {static: true})
|
droppedFiles |
Type : DroppedFile[]
|
ValidationPattern |
Default value : ValidationPattern
|
Allows to select a binary for upload, or to specify URI to external resource. Component provides drop area functionality allowing you to just drop files within specified area.
Attributes: