Req: Show binary files (like images) in file preview
What is the improvement or update you wish to see?
There's a new Tauri function exposed to the FE called get_pr_template_contents that can be modified to also return binary content like that from images. This can be used in order to show image files in the file preview, instead of bailing and just saying "Can't show binary content" as we do currently.
Is there any context that might help us understand?
No response
Does the docs page already exist? Please link to it.
No response
Would it work if we create a match operator where if read_file_from_workspace throws a error, we handle it in the get_pr_template_contents, and parse the binary content into a b64 content?
How do i get assigned?
I'd say either we a) skip get_pr_template_contents in this scenario and make a new cmd or b) rename that to make it more generic and have it also handle binary contents like you mentioned.
Feel free to take a stab at it, just mention this issue in the PR and well be happy to work with you on it.
I approached it this way : I removed the read_file_from_workspace and used some part of it, and added my own binary parsing logic.
q1)Can the output remain as the b64 string version of the binary? or do you want it in some particular format. q2)If I have to refactor the binary parsing logic into a seperate fn for tauri, in which file do you want me to create it?
Can it be clarified how this issue relates to #4852? It seems like the PR is lacking the dedicated backend function, but probably I am missing some details.
Can it be clarified how this issue relates to #4852? It seems like the PR is lacking the dedicated backend function, but probably I am missing some details.
that basically is what they mean, exposing the $HOME dir to the frontend can cause some sec concerns, I have tried impl where we generate the b64 and then we can send it to frontend