src/ui/file-upload/smart-file-upload.component.ts
AfterViewInit
OnDestroy
ISSEHEnabledComponent
| changeDetection | ChangeDetectionStrategy.Eager |
| providers |
SmartFileUploadServerSideEventHandlerService
SmartFileUploadService
|
| selector | smart-file-upload |
| styleUrls | ./smart-file-upload.component.scss |
| templateUrl | ./smart-file-upload.component.html |
| smart-file-upload-action-buttons-layout |
Type : ActionsLayout
|
|
The action buttons layout for the file upload. |
| smart-file-upload-allow-multiple |
Type : boolean
|
Default value : false
|
|
Whether to allow multiple file uploads. |
| smart-file-upload-allowed-extensions |
Type : string[]
|
|
The allowed extensions for the file upload. |
| smart-file-upload-auto-upload |
Type : boolean
|
Default value : false
|
|
Whether to auto upload the files. |
| smart-file-upload-batch |
Type : boolean
|
Default value : true
|
|
Whether to batch the file uploads. |
| smart-file-upload-before-upload-handler |
Type : string
|
|
The before upload handler for the file upload. |
| smart-file-upload-context |
Type : any
|
| smart-file-upload-disabled |
Type : boolean
|
|
Whether to disable the file upload. |
| smart-file-upload-max-file-size |
Type : number
|
|
The maximum file size for the file upload. |
| smart-file-upload-min-file-size |
Type : number
|
|
The minimum file size for the file upload. |
| smart-file-upload-on-error-handler |
Type : string
|
|
The on error handler for the file upload. |
| smart-file-upload-on-select-handler |
Type : string
|
|
The on select handler for the file upload. |
| smart-file-upload-on-success-handler |
Type : string
|
|
The on success handler for the file upload. |
| smart-file-upload-upload-url |
Type : string
|
|
The upload URL for the file upload. If the uploadUrl is not provided, defaults to /web/UploadFiles. If the uploadUrl is provided, /web/UploadFiles/{uploadUrl}. |
| ignoreFlexboxLayout |
Type : boolean
|
| smart-help-text |
Type : string | undefined
|
|
Sets the HelpText value for this form child. |
| smart-instance-name |
Type : string
|
|
The instance name of the component |
| smart-object-name |
Type : string
|
|
The object name of the component |
| smart-file-upload-before-upload |
Type : EventEmitter
|
|
Emits the before upload event. |
| smart-file-upload-error |
Type : EventEmitter
|
|
Emits the error event. |
| smart-file-upload-select |
Type : EventEmitter
|
|
Emits the select event. |
| smart-file-upload-success |
Type : EventEmitter
|
|
Emits the success event. |
| callLogicMethod | ||||||||||||
callLogicMethod(methodName: string, ...args: any[])
|
||||||||||||
|
Calls a logic method. Delegates to the form instance.
Parameters :
Returns :
Promise | any
The result of the method call. |
| getDataSource |
getDataSource()
|
|
Gets the data source as an observable.
Returns :
Observable<SmartDataSource>
The data source as an observable. |
| handleLayoutChange | ||||||||
handleLayoutChange(newLayout: any)
|
||||||||
|
Handles the layout change event.
Parameters :
Returns :
void
|
| Public notifyLoadingFinished | ||||||
notifyLoadingFinished(objectName: string)
|
||||||
|
Notifies the parent Smart Form that this form child has finished loading
Parameters :
Returns :
void
void |
| Readonly elementRef |
Type : unknown
|
Default value : inject(ElementRef)
|
| eventHandlers |
Type : SSEHEventHandlerDefinitions
|
Default value : {}
|
| files |
Type : unknown
|
Default value : signal<FileInfo[]>([])
|
| Readonly fileSelectComponent |
Type : unknown
|
Default value : viewChild.required<FileSelectComponent>(FileSelectComponent)
|
|
The Kendo UIfile upload component. |
| Public injector |
Type : Injector
|
| uploadUrl | ||||||||
getuploadUrl()
|
||||||||
|
The upload URL for the file upload. If the uploadUrl is not provided, defaults to /web/UploadFiles. If the uploadUrl is provided, /web/UploadFiles/{uploadUrl}. |
||||||||
setuploadUrl(value: string)
|
||||||||
|
The upload URL for the file upload. If the uploadUrl is not provided, defaults to /web/UploadFiles. If the uploadUrl is provided, /web/UploadFiles/{uploadUrl}.
Parameters :
Returns :
void
|
| disabled | ||||||
getdisabled()
|
||||||
|
Whether to disable the file upload. |
||||||
setdisabled(value: boolean)
|
||||||
|
Whether to disable the file upload.
Parameters :
Returns :
void
|
| actionButtonsLayout | ||||||||
getactionButtonsLayout()
|
||||||||
|
The action buttons layout for the file upload. |
||||||||
setactionButtonsLayout(value: ActionsLayout)
|
||||||||
|
The action buttons layout for the file upload.
Parameters :
Returns :
void
|
| maxFileSize | ||||||
getmaxFileSize()
|
||||||
|
The maximum file size for the file upload. |
||||||
setmaxFileSize(value: number)
|
||||||
|
The maximum file size for the file upload.
Parameters :
Returns :
void
|
| minFileSize | ||||||
getminFileSize()
|
||||||
|
The minimum file size for the file upload. |
||||||
setminFileSize(value: number)
|
||||||
|
The minimum file size for the file upload.
Parameters :
Returns :
void
|
| allowedExtensions | ||||||
getallowedExtensions()
|
||||||
|
The allowed extensions for the file upload. |
||||||
setallowedExtensions(value: string[])
|
||||||
|
The allowed extensions for the file upload.
Parameters :
Returns :
void
|
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**************************************************************************
--------------------------------------------------------------------------
File : smart-file-upload.component.html
Purpose : Template for Smart File Upload.
Author(s) : Radu Nicoara
Created : Jul 21, 2025
--------------------------------------------------------------------------
-->
<div class="smart-file-upload h-100 w-100 d-flex flex-column gap-2">
<kendo-fileselect
class="smart-file-upload w-100 flex-grow-1 flex-grow-1"
[multiple]="allowMultiple"
(select)="handleSelect($event)"
(remove)="handleRemove($event)"
[restrictions]="fileRestrictionsSignal()"
[disabled]="disabledFileSelectSignal()">
</kendo-fileselect>
<div [class]="actionButtonsLayoutClassesSignal()">
<button
kendoButton
themeColor="primary"
[class]="actionButtonClassesSignal()"
[disabled]="disabledActionButtonsSignal()"
(click)="handleUpload()">
{{ uploadButtonTextSignal() }}
</button>
<button
kendoButton
[class]="actionButtonClassesSignal()"
[disabled]="disabledActionButtonsSignal()"
(click)="handleClear()">
Clear
</button>
</div>
</div>
./smart-file-upload.component.scss
/**********************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**********************************************************************/
/*------------------------------------------------------------------------
File : smart-file-upload.component.scss
Purpose : Styles for Smart File Upload.
Author(s) : Radu Nicoara
Created : Apr 07, 2025
----------------------------------------------------------------------*/
:host {
display: block;
}