$("#UploadDefault").ejUploadbox({
removeUrl: "https://js.syncfusion.com/ejServices/api/uploadbox/Save",
autoUpload:true,
showFileDetails: false,
showBrowseButton: false,
extensionsAllow: ".zip",
multipleFilesSelection: false,
buttonText: { upload: "Carica", cancel: "Cancella" },
dialogAction: { closeOnComplete: true },
allowDragAndDrop: true,
success: function(args)
{
console.log(args.files.name + " uploaded successfully")
}
}); |
Hi Pio Luca,Good day to you.We suspect that you have misunderstood the functionalities of the property “showBrowseButton”. “showBrowserButton” can be set to false in case where allowDragAndDrop is set to true. Uploadbox use either browser button or drag and drop to select and upload files. So, while setting “showBrowseButton” along with “allowDragAndDrop” will hide the browse button and files can be uploaded from drop area directly. This is the logic of the control and upload cannot be done without both browse button and drag and drop. Please refer to the following code.
$("#UploadDefault").ejUploadbox({removeUrl: "https://js.syncfusion.com/ejServices/api/uploadbox/Save",autoUpload:true,showFileDetails: false,showBrowseButton: false,extensionsAllow: ".zip",multipleFilesSelection: false,buttonText: { upload: "Carica", cancel: "Cancella" },dialogAction: { closeOnComplete: true },allowDragAndDrop: true,success: function(args){console.log(args.files.name + " uploaded successfully")}});Also, few properties in Uploadbox are dependent on each other based on the control workflow logic. For example, you have set showFileDetails false which will hide the file upload progress dialog which has the Upload button for upload action. So in this case, you need to set autoUpload as true so that files will be uploaded automatically after selection. Please refer to the below given UG for more details on Uploadboxhttps://help.syncfusion.com/js/uploadbox/drag-and-drop-support#drop-area-with-browse-button-behaviorPlease let us know, if you have any concern on this.Regards,Ashokkumar B.
Hi Pio Luca,You can render any type of button inside grid toolbox based on your requirement. Hiding browse button will affect file upload action, so we suggest you set height and width of Uploadbox as “0px” on the page and trigger file upload from that button on Grid. Please refer to the below KB links to know how to trigger file upload without browse button.Please let us know, if you have any concern on this.Regards,Ashokkumar B.
.e-uploadbox.e-widget.browseBtn .e-selectpart.e-select {
border: none;
} |