We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Upload button not showing

Thread ID:





146397 Aug 2,2019 12:12 PM UTC Aug 6,2019 10:51 AM UTC Angular - EJ 2 2
Tags: Uploader
Asked On August 2, 2019 12:12 PM UTC

My control does not appear with the Upload button. I used:
<ejs-uploader #defaultupload [autoUpload] = 'false' locale = 'locale'> </ejs-uploader>

In that same case, how can I override the Upload button click?

Narayanasamy Panneer Selvam [Syncfusion]
Replied On August 5, 2019 12:24 PM UTC


Greetings from Syncfusion support.

Currently we are working on your issue, we will get back to you with further details shortly.
Narayanasamy P. 

Narayanasamy Panneer Selvam [Syncfusion]
Replied On August 6, 2019 10:51 AM UTC

Thanks for your patience. 
We have validated your queries. Please find the details in below, 
Query 1: I could not reproduce the example page: https://ej2.syncfusion.com/angular/documentation/uploader/getting-started/ 
We were unable to reproduce your issue from the getting started document. Uploader was rendered with Upload and Cancel buttons.

Sample Link:
Also, if you want to change the button names in the Uploader component as per the required culture, you can load it as mentioned in the below code example. Here, we have changed as per the “fr-CH” culture. 
<ejs-uploader #defaultupload [autoUpload]='false' [asyncSettings]='path' [locale]='locale'></ejs-uploader> 
import { Component } from '@angular/core'; 
import { detach, L10n } from '@syncfusion/ej2-base'; 
selector: 'app-root', 
templateUrl: './app.component.html', 
styleUrls: ['./app.component.css'] 
export class AppComponent { 
// Define the Save and remove URL for upload and remove action 
public path = { 
saveUrl: 'https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save', 
removeUrl: 'https://aspnetmvc.syncfusion.com/services/api/uploadbox/Remove' 
// Define the locale. 
locale= 'fr-CH'; 
ngOnInit() { 
// Customize the Uploader names with corresponding locale. 
"fr-CH": { 
"uploader": { 
"invalidMinFileSize": "La taille du fichier est trop petite! S'il vous plaît télécharger des fichiers avec une taille minimale de 10 Ko", 
"invalidMaxFileSize": "La taille du fichier dépasse 28 Mo", 
"invalidFileType": "Le type de fichier n'est pas autorisé", 
"Browse": "Feuilleter", 
"Clear": "Clair", 
"Upload": "Télécharger", 
"dropFilesHint": "ou Déposer des fichiers ici", 
"uploadFailedMessage": "Impossible d'importer le fichier", 
"uploadSuccessMessage": "Fichier téléchargé avec succès", 
"removedSuccessMessage": "Fichier supprimé avec succès", 
"removedFailedMessage": "Le fichier n'a pas pu être supprimé", 
"inProgress": "Téléchargement", 
"readyToUploadMessage": "Prêt à télécharger", 
"remove": "Retirer", 
"cancel": "Annuler", 
"delete": "Supprimer le fichier" 
To know more about localization, please refer the below UG link. 
Query 2: 
In that same case, how can I override the Upload button click? 
We can override the upload button click by create the external HTML button component by using “buttons” API as mentioned in the below code example. Here, we bind the click event to the external button component and call the upload method from the Uploader source. 
<ejs-uploader #defaultupload id='defaultfileupload' [asyncSettings]='path' [autoUpload]='false' [dropArea]='dropElement' (removing)='onFileRemove($event)' [buttons]='buttons'></ejs-uploader> 

import { Component, ViewChild, ViewEncapsulation, Inject } from '@angular/core'; 
import { createElement } from '@syncfusion/ej2-base'; 
import { UploaderComponent, RemovingEventArgs } from '@syncfusion/ej2-angular-inputs'; 
selector: 'app-root', 
templateUrl: 'app.component.html', 
styleUrls: ['app.component.css'], 
encapsulation: ViewEncapsulation.None 
export class AppComponent { 
public uploadObj: UploaderComponent; 
public path: Object = { 
saveUrl: 'https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save', 
removeUrl: 'https://aspnetmvc.syncfusion.com/services/api/uploadbox/Remove' 
public dropElement: HTMLElement = document.getElementsByClassName('control-fluid')[0] as HTMLElement; 
public onFileRemove(args: RemovingEventArgs): void { 
args.postRawFile = false; 
public uploadEle: HTMLElement = createElement('span', { className: 'upload e-icons', innerHTML: 'Upload All' }); 
public buttons: Object = { 
browse: 'Choose file', 
// Assign the external button to upload button 
upload: this.uploadEle 
ngAfterViewInit() { 
// Store the uploader instnce in the variable 
var Uploader = this.uploadObj; 
(this.uploadEle).addEventListener('click', function (e) { 
// Call source upload method to perform upload action 
(Uploader as any).uploadButtonClick(); 

To know more about Uploader component, please refer the below UG documentation link. 
Still the reported issue persists, please revert us with issue reproducing sample, code example or clear requirement that will help us to provide the exact solution at our end. 
Narayanasamy P. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon