embedding-api-v3-guide
embedding-api-v3-guide copied to clipboard
[ENHANCEMENT REQUEST] Downloading images directly from the code
Our company Wiiisdom creating an application that uses the embedding API to retrieve data from Vizzes in automation.
Unfortunately, when downloading the image we need to click on the "Download" button in the embedded Viz. This download is in the user directory. But, when the user enables the "Save as" capability in its browser configuration we are unable to retrieve the image.
Enhancement Would be it possible to have a function directly in the embedding API to download the image?
To confirm, viz.exportImageAsync()
tells the browser to download the viz image. Is that what you are looking for?
https://help.tableau.com/current/api/embedding_api/en-us/docs/embedding_api_export.html#export-image-png
Or an API that returns the base64-encoded string data of the image itself?
Hello,
I'm sorry for the response time I didn't receive the notification, thank you for your fast answer !! Unfortunately, we already use this function to export the image and it raises the "Save as" popup.
After updating data on it with the embedding API, we need to retrieve a screenshot of the Viz (like filters or parameters). So if an API that returns this screenshot with the changes exists it's exactly what I'm looking for.
Thank you. Let me me make sure I'm understanding correctly.
-
viz.exportImageAsync()
is insufficient because some users configure their browser to prompt for the save location when the image attempts to download; and this prevents some later logic in your web app from retrieving this image from the filesystem? - The request is to add an API that returns the base64-encoded string data of the image itself, allowing you to retrieve the screenshot directly from the code rather than relying on the browser downloading the file?
Something like this:
const base64str = viz.getImageDataAsync();
console.log(base64str);
// data:image/png;base64,iVBOR...ErkJggg==
- Because of the browser's dialogue, we can't save the image in any folder. Unfortunately, it's insufficient yes :/.
- Exactly, it would be perfect!
const base64str = viz.getImageDataAsync();
console.log(base64str);
// data:image/png;base64,iVBOR...ErkJggg==
I want to use this. I really need it...