Articles in this section
Category / Section

How to resolve dropareatext of undefined in JS UploadBox?

1 min read

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

 

Locale property may be added from the system region settings as shown in the below image. 

 

language

 

 

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.

 

language

 

 

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.

 

https://www.syncfusion.com/forums/152718/uploadbox-unable-to-get-property-dropareatext-of-undefined-or-null-reference

 https://www.syncfusion.com/forums/142010/drag-drop-not-working-cannot-read-property-dropareatext-of-undefined


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 forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied