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

SqlReader removed from V5 #453

Open
edavis1993 opened this issue Jan 19, 2023 · 1 comment
Open

SqlReader removed from V5 #453

edavis1993 opened this issue Jan 19, 2023 · 1 comment

Comments

@edavis1993
Copy link

We're currently on V4 looking to upgrade but we use ImageResizer to pull all our images from our database using the SqlReader plugin. In the change log it says this plugin has been removed. Are we just stuck on V4 now or is there a workaround?

@lilith
Copy link
Member

lilith commented Jan 20, 2023

SqlReader became unwieldy and untestable due to supporting such a wide variety of situations. Not many people use it anymore, either. That said, we tried to maintain backwards compatibility with existing blob providers, so you should be able to copy/paste the V4 class file into your project and rename it: https://github.com/imazen/resizer/blob/support/v4/Plugins/SqlReader/SqlReader.cs

If you want, you could trim it down to what you actually use, or reimplement it.

Inheriting from ImageResizer.Storage.BlobProviderBase and implementing Task<Stream> OpenAsync(string virtualPath, NameValueCollection queryString) is the typical way.

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

2 participants