How to resolve dropareatext of undefined in JS UploadBox?
Problem Description:
Unable to get property 'DropAreaText’ of undefined or null reference / Cannot read property 'DropAreaText' of undefined.
Cause of error:
This error may occur when we render the UploadBox control with locale property without specifying the corresponding locale texts in the sample. If you have not set locale property in sample level, this may be added from your machine. Please ensure once whether “locale” exists anywhere in your page as shown below.
Locale property may be added from the system region settings as shown in the below image.
Solution
Please ensure this in your machine. If you don’t require this locale kindly change this format settings to the required language as shown below.
By default, Syncfusion controls will be rendered with default English (en-US) culture. If you are machine is configured with any culture other than en-US, please add its corresponding locale text values in script section as like below to resolve this issue.
<script type="text/javascript"> ej.Uploadbox.Locale["nl-NL"] = { buttonText: { upload: "Uploaden", browse: "Blader", cancel: "Annuleer", close: "Dichtbij" }, dialogText: { title: "Upload Box", name: "Naam", size: "Grootte", status: "toestand" }, dropAreaText: "Drop bestanden of klik om te uploaden", filedetail: "Het geselecteerde bestand is te groot. Selecteer een bestand binnen het geldige grootte.", denyError: "Bestanden met #Extension extensies zijn niet toegestaan.", allowError: "Alleen bestanden met #Extension extensies zijn toegestaan.", cancelToolTip: "Annuleer", removeToolTip: "Verwijderen", retryToolTip: "opnieuw proberen", completedToolTip: "Voltooid", failedToolTip: "Mislukt", closeToolTip: "Dichtbij", } </script>
Similar forums in which we addressed the queries reported with same error problem.
Conclusion
I hope you enjoyed learning about how to resolve dropareatext of undefined in JS UploadBox.
You can refer to our JavaScript
UploadBox feature tour page to know about its other groundbreaking
feature representations and documentation, and
how to quickly get started for configuration specifications.
You can also explore our JavaScript
UploadBox example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!