plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Request]: share image or file from uint8list

Open ARASHz4 opened this issue 2 years ago • 5 comments

Plugin

share_plus

Use case

Share image or file from uint8list

Proposal

I want to share image or file from uint8list, but only can share file from path

ARASHz4 avatar Jun 26 '22 08:06 ARASHz4

Hi there, we need to pass the OS paths on the plugin side, which is why we only accept paths on the dart side.

Is it unfeasible to write your bytes to a file and then passing that file to share_plus in your codebase? I think the only way we could implement this is writing the file to disk ourselves, which would just add extra complexity for no real gain.

PS: You could just create a temporary directory or use the temp dir path_provider offers.

Looking forward to hearing from you :)

Coronon avatar Jul 06 '22 07:07 Coronon

Hi there, I use Share_Plus to share the file on the web. The requirement is to get data on the screen, write them to a file, and share them. But I can't create a temporary file like mobile on the web. So is any way to do this? or do you have any suggestions? Thanks and have a nice day!

PhamNgocPhi avatar Jul 07 '22 03:07 PhamNgocPhi

I see, sadly share_plus does not support sharing files on web at all. Sharing is mainly concept mainly focused on mobile devices. Maybe allow your users to download your content directly :)

PS: I once created a react component for downloading files created dynamically with JS, hit me up if you are interested ;)

Coronon avatar Jul 07 '22 12:07 Coronon

I want to share image from uint8list and use wc_flutter_share and It's work. But now it was DISCONTINUED

Now I want to add this to share_plus

Jamalianpour avatar Sep 11 '22 08:09 Jamalianpour

Have you tried to store the file in a temporal path and then share that file?

miquelbeltran avatar Sep 11 '22 12:09 miquelbeltran