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

Comments

2 comments

  • Official comment
    Avatar
    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

    Comment actions Permalink
  • Avatar
    Gitahi Ng'ang'a

    This works. Thank you.

    0
    Comment actions Permalink

Please sign in to leave a comment.