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

URLSearchParams #8

Closed
tylercollier opened this issue Mar 23, 2020 · 2 comments
Closed

URLSearchParams #8

tylercollier opened this issue Mar 23, 2020 · 2 comments

Comments

@tylercollier
Copy link

@tylercollier tylercollier commented Mar 23, 2020

Would you consider allowing developers to specify the URLSearchParams implementation? The situation I'm running into is with React Native. When I use imagekit.url(...), I get the error not implemented. This is due to a bug in React Native. There is a way to get around it, but this bloats the bundle size, so it'd be better if I could instead include another implementation of URLSearchParams, such as this one. I'm guessing you'd do it like this:

const URLSearchParamsPolyfill = require('url-search-params-polyfill');

var imagekit = new ImageKit({
    publicKey : "your_public_api_key",
    urlEndpoint : "https://ik.imagekit.io/your_imagekit_id",
    authenticationEndpoint : "http://www.yourserver.com/auth",
    URLSearchParams: URLSearchParamsPolyfill,
});  
@imagekitio
Copy link
Collaborator

@imagekitio imagekitio commented Apr 5, 2020

It seems that if we use . append method which is implemented instead of .set then it will work.

Please test the changes in latest version 1.2.1

@imagekitio imagekitio closed this Apr 5, 2020
@tylercollier
Copy link
Author

@tylercollier tylercollier commented Apr 5, 2020

It works, thanks!

@tylercollier tylercollier mentioned this issue Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.