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

Can't set signature (Glide) #44

Closed
DennyWeinberg opened this issue Apr 30, 2017 · 5 comments
Closed

Can't set signature (Glide) #44

DennyWeinberg opened this issue Apr 30, 2017 · 5 comments

Comments

@DennyWeinberg
Copy link

Before:
Glide.with(mActivity).load(mediaItem.getUri()) .skipMemoryCache(true) //.asBitmap() //.imageDecoder(new StreamBitmapDecoder(mActivity, DecodeFormat.PREFER_ARGB_8888)) .thumbnail(0.4f) .dontAnimate() .signature(mediaItem.getSignature()) .into(photoView);

after:
photoView.showImage(mediaItem.getUri());

I need to set the signature because I edited my photo and need to reset the glide cache.

@steosoft
Copy link

@DennyWeinberg can you tell how you solved this issue?

@DennyWeinberg
Copy link
Author

Did not found any no good solution for that. I still use glide with chrisbeans PhotoView.

@Piasy
Copy link
Owner

Piasy commented Aug 19, 2017

You can do something on the GlideImageLoader.

@steosoft
Copy link

steosoft commented Aug 19, 2017

@Piasy how to do that? I've tried to add in method
public void loadImage(final Uri uri, final Callback callback)
something like this:
File file = new File(uri.getPath());
and before downloadOnly add this:
.signature(new StringSignature(file.length() + "@" + file.lastModified())
but .signature and downloadOnly is not working together.. :(

@Piasy
Copy link
Owner

Piasy commented Aug 20, 2017

That's all about glide, maybe you can check out its docs.

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

3 participants