Hi,
I currently face a weird request. I want to add a button to download files from an external REST API. For some specific reasons I must not calls the service from client side. So I'm trying to use an Plugin registered on a custom action and then call the custom action in JavaScript web resource. My question is how to return a binary from custom action? Did any one face the same need and can help me?
May be my approach isn't the best. Any proposal will be welcome.
*This post is locked for comments
Hello Kfranck
Could you please share your solution,
I face this issue.
Thank you in advance.
Hi,
I'm happy to hear that.
If it's not private can you share your code for future questions? maybe someone will have same question like you.
Emre,
Your solution fits well what I need. I try it with FileSaver.js, and I can download my files.
Thank you for your help.
Hi,
I think you should convert your file to Base64 and return as "string" output parameter from custom action.
At clientside, you can use FileSaver.js (github.com/.../FileSaver.js)
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6