In Magento 2, how can I handle real-time user input (e.g., uploading a Block Blast puzzle screenshot) and pass it to a custom module that processes the image and returns puzzle solutions instantly without full page reload?
Hi @humafahim2bcf6 ,
Well, I haven’t encountered the exact same puzzle-specific requirement in Magento 2, but it seems possible if you have some logic or an API available that can take an uploaded image and return a solution either from a third party or your own code.
High-level steps:
1) Image upload and AJAX call - Use JavaScript to capture the image input and send it to a controller via an AJAX request.
2) Controller should handle the uploaded image, invoke your puzzle‑solver logic (or forward the image to a third‑party API), and return a JSON response.
Thanks,
Ankit