Skip to main content

How can I set adv_ocr:document on an upload preset?

Comments

2 comments

  • Official comment
    Danny Valentine

    Hi Gitahi.

    Thanks for your question. Certain advanced components of an upload preset need to be created via the API instead, as the UI has some limitations. I've gone ahead and created the Upload Preset unsigned_ocr_document in your account which uses adv_ocr:document, using the following little Node script:

    cloudinary.v2.api.create_upload_preset(
      { name: "unsigned_ocr_document", 
        unsigned: true, 
        invalidate: true,
        use_filename: true,
        unique_filename: true,
        type: 'upload',
        ocr: 'adv_ocr:document',
        auto_tagging: '0.7',
        access_control: '[{"access_type":"token"}]'
    })
        .then(result => {console.log(result)})
        .catch(error => {console.log(error)});

    I hope this helps. Please let me know if you encounter any issues.

    Many thanks,
    -Danny

  • Gitahi Ng'ang'a

    This works. Thank you.

    0

Post is closed for comments.