Make Adding a Profile Picture using File Uploader a REQUIRED Step

Hi @Nikolai,

If the uploader is a part of a form, there’s a way to make it reuierd. See this article for details

Alternatively, you can check the widget’s value with JS before submitting the form:

const widget = uploadcare.Widget("[role=uploadcare-uploader]");

function isFileUploaded(widget) {
  return !!widget.value();
}

// on form submit
...
if (isFileUploaded(widget)) {
  form.submit();
} else {
  alert("File is not uploaded");
}
...