Secure docs on upload

Step 1: Include the main script in the head section

<script src="https://app.autoproof.dev/upload-script.min.js"></script>

Step 2: Mark up forms with the autoproof-form class

<form action="/your-upload-endpoint" method="post" enctype="multipart/form-data" class="autoproof-form">
    <input type="file" name="files" multiple>
    <button type="submit">Upload Files</button>
</form>

Step 3: Initialize the script with the required parameters

<script>
   document.addEventListener('DOMContentLoaded', function() {
       var autoproof = new AutoproofUploader({
            apiKey: 'YOUR_API_KEY_HERE',
            prefill: {
                fullname: 'John Smith',
                address: 'NY, 7 ave, 34',
                email: 'example@example.com'
            },
            skipPrefilledForm: true,
            skipSuccessMessage: true,
            customStyles: {
                popupBackgroundColor: '#f0f0f0',
                buttonColor: '#28a745',
                buttonHoverColor: '#218838',
                buttonTextColor: '#fff'
            },
            customCSSUrl: 'https://example.com/custom-autoproof-styles.css'
       });
   });
</script>

Last updated