Skip to main content
Skip table of contents

Disabling auto-upload

Thru also supports a version of the web component that allows disabling the auto-upload functionality.

You can trigger the upload with the following code:

CODE
<thru-upload
  api-key=""
  flow-endpoint-id="1681"
  api-url="https://exampleurl.thruinc.net/api"
  auto-upload="false"
></thru-upload>
<button onclick="trigger_uploads()">Upload</button>

<script>
      trigger_uploads = () => {
        const triggerUploadsEvent = new CustomEvent("trigger-uploads")

        // Trigger the event
        document.dispatchEvent(triggerUploadsEvent)
      }
</script>

Default functionality is unchanged. You must specify auto-upload="false" for this behavior to be present.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.