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

Custom Uri handlers / accepting arbitrary InputStreams #3

Closed
mcginty opened this issue Mar 26, 2015 · 11 comments
Closed

Custom Uri handlers / accepting arbitrary InputStreams #3

mcginty opened this issue Mar 26, 2015 · 11 comments
Assignees

Comments

@mcginty
Copy link

mcginty commented Mar 26, 2015

The current Uri handlers are great for many cases, but in our app (and many others) we store our media encrypted on disk. Because of this, vanilla ContentProviders are unavailable as an option as we'd have to write a temporary unencrypted version to disk (ewww). The other option in Fresco would be to setup a localhost HTTP server that streams the unencrypted version (ewwwwww), which is a lot of unnecessary overhead.

If, however, Fresco allowed additional custom Uri handlers that provide InputStreams, we'd be golden. Alternatively, having a setImageInputStream alongside setImageUri would also suffice.

@mcginty mcginty changed the title Custom Uri handlers Custom Uri handlers / accepting arbitrary InputStreams Mar 26, 2015
@plamenko
Copy link
Contributor

We are thinking of supporting something very similar (basically either a custom uri handler or specifying InputStream Supplier while building image request).

@kenyee
Copy link

kenyee commented Mar 28, 2015

I was going to say exactly the same thing...our app has data stored on disk in encrypted form as well. It's only unencrypted when in the in-memory cache.
Thanks for supporting this soon @plamenko :-)

We also need a way to change the disk data (e.g., user edits a document/photo and writes it to disk, so the cache has to update)...

@plamenko
Copy link
Contributor

I'll have to refactor some of the fetching logic to make this plugin-like, but hopefully I'll get to this some time soon.

@ashughes
Copy link

I'm running into this same issue. I'd like to use this in conjunction with Conceal or another file encryption mechanism which provides an InputStream.

@agirardello
Copy link

@plamenko is there a timeline on this or any way I can "help" or use an InputStream with the current API? We would like to use in this app https://play.google.com/store/apps/details?id=fm.clean for its internal Gallery.

@caojianfeng
Copy link
Contributor

I`m running into this issue too.
I think we can use content provider.
See http://frescolib.org/docs/supported-uris.html#_
Fresco support "content:" like url.
so we can make a content provider and do decrypt in it at first.
and then set uri "content:xxx?id=xxx&key=xxx" to drawee.

@anotherdev
Copy link

@caojianfeng do you have an example code for that content provider?

@sohayb
Copy link

sohayb commented Mar 16, 2017

@plamenko any update regarding a custom Uri handler?

@kirwan
Copy link
Contributor

kirwan commented Aug 31, 2017

I don't think we're likely to get to this any time soon. If someone would like to offer a pull request, I'd be willing to offer support.

We're currently cleaning up old issues which aren't progressing but I'll leave this a little longer in case anyone is interested in pursuing this.

@erikandre
Copy link
Contributor

Closing this as part of our cleanup of old issues.

If anyone requires this feature, please consider implementing it and submitting a pull request.

@AntDev95
Copy link

AntDev95 commented Sep 1, 2020

I don't think we're likely to get to this any time soon. If someone would like to offer a pull request, I'd be willing to offer support.

As I understand it, nothing was implemented in the end?

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

No branches or pull requests