How to update context after Upload Widget uploads?
I am using the Upload Widget and an upload preset to execute the OCR add-on. I see the detected ocr text in the response json when the upload completes. How do I add this detected text to that image's context?
This is a little different than specifying the context before the image begins to upload. The ocr detected text is not available until after the upload completes.
My use case calls for having an "alt" on every image which contains any text that may appear in that image. For example, if the image is a business card, then I need to have the "alt" text be whatever text the business card contains.
-
Hi Fidel,
A way that I could think of is to use the update method of the Admin API. The flow is to send the json result to your backend which will call the Admin API to update the just uploaded resource to add the metadata.
Please let me know if this makes sense?
Regards,
FrancisÂ
Please sign in to leave a comment.
Comments
1 comment