Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Client function for downloading a BASE64 File #442

Open
pgrill79 opened this issue Dec 28, 2024 · 0 comments
Open

[Feature Request] Client function for downloading a BASE64 File #442

pgrill79 opened this issue Dec 28, 2024 · 0 comments

Comments

@pgrill79
Copy link

pgrill79 commented Dec 28, 2024

We have build a File Upload area, which gives the user the possibility to store Attachments to their artefacts:

image

The files are stored as BASE64 string in the database. The issue is now, how the user can download the file again.

There is the option to dowload these files via the saveAs(new Blob([data]), filename) function within the HTML widget.

But in my case i have a dynamic list of attachments (as the user can upload the files by himself). So i could buid a kind of dynamic table with the HTML widget and add a download button for each attachment. But even then all the attachemtens are already loaded (the binary strings) when the HTML widget is shown (and the attachments can be big). (Even if the user do not want to download files).

So i get all the base64 string with filename and type from the database again - in our example with the download action in the action table:

image

The download action does a query which retrieves the file info from the database (with base64 payload).

so it would be great if there is a client function like "$convertToFile(base64string, filename, contentype) - i can use (also in a non HTML widget) after retrieving the content to store the file then. So it would also be possible that the user can select multiple files for downloading which i can iterate then.

Maybe there are already other possibilities to achieve the goal ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant