How to change the default button text on the widget?

You can change the text with the help of UPLOADCARE_LOCALE_TRANSLATIONS global variable.

<script>
UPLOADCARE_LOCALE_TRANSLATIONS = {
  buttons: {
    choose: {
      files: {
        one: 'Upload your CV',
        other: 'Upload your documents '
      },
      images: {
        one: 'Upload your photo',
        other: 'Upload your photos'
      }
    }
  }
};
</script>

Tweak the files object to put a custom text in a single or multiple widget buttons. Note that the images object will overshadow files if images-only attribute is set for a widget.

1 Like

how can i do this ? how to change choose a file instead of choose an image and where i need to change this in uploadcare site?

@ms1 the text on the widget button depends on the images-only widget option. If it’s enabled, you’ll see the “Choose an image” text. You can replace this text with your own via locale translation. The code from the example should be placed on your webpage.