Is there a way to get the image's file name and extension when using the Rest API or Web SDK? We use Miro for ideation and then wanted to load the data into the source system.
Already have an account? Login
Log in to the community
Log in with your Miro account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Thanks for sharing the feedback and context,
@WolfB! It’s very helpful to understand the use case, and can appreciate why this would be valuable, especially for using the console.
I will pass this along to our product team!
Good question. I believe this should be exposed when you make a GET request to the image’s resource URL via the REST API.
First, make a GET request to the image itself, such as:
This should return a data object that includes an `imageUrl` field. Next, take this imageUrl and make a subsequent GET request (using the same bearer token), and update the `format` query parameter from its default of “preview” to instead be “original”. So it might look something like this:
And the url returned in the response should include the original file name and extension in it’s parameters.
I hope it helps!
Thanks for the feedback,
@saraTom! I agree it could be a bit easier to access these image file details—I’ve shared this feedback with our product team and hopefully we can improve the experience.
As for the docs, this image resource url is documented under the 200 response example, let me know if it helps!
How can I obtain the file name of an image using the Web SDK?
Background: When I drag and drop an image file from my computer onto the Miro board the image appears as a selected object on the board and its original file name appears at the top (together with some menu items). However, when I retrieve the corresponding image object via the Web SDK, the title property still only shows a null value.
It would be much more helpful, if images added to the board using Drag & Drop would retain their names as a property accessible via the Web SDK.
It’s a great question, and excellent feedback. There’s not currently an out-of-the-box method for getting image filename via the Web SDK—just the REST API for the moment. We hope to support this in the future, though.
Another option for now, however, could be to leverage the setMetadata method in the SDK to hold these details.
Thanks for this feedback,
@Will Bishop, and raising my hope. 😉
The main reason I’d like to see this in the Web SDK is that I’m a little wheel in a huge corporation with no access rights to develop a full-fledged Miro app (neither with the Web SDK, nor the Rest API). I can, however, automate a few tedious tasks using the Web SDK in the browser console. Yes, this comes with a few other restrictions, but is still faster than performing repetitive tasks manually.
Thanks for responding
When I give the original format for retrieving the signed url, I still see only two fields: url and type.
But I see the original name in the url. I can extract that info parsing the url. It would have been nice if original file name is an attribute in the request
Also I could not find documentation for API end point for getting images-- in Rest doc