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

Ability to use API client instances instead of globally configured instance #140

Open
alxgsv opened this issue Nov 28, 2023 · 1 comment
Assignees

Comments

@alxgsv
Copy link
Contributor

alxgsv commented Nov 28, 2023

I am using uploadcare-ruby in my webservice that works with different Uploadcare projects. In order to switch between project I use this code: https://github.com/alxgsv/uc/blob/main/app/services/uploadcare_service.rb#L5-L14

However, without inspecting sources, I'm not sure that code is thread-safe, and I'm extremely worried about race conditions that could lead to reads or writes to wrong project, violating security and privacy.

It would be great to have an ability to initialize API client and to have guarantee that everything will work as expected:

client = Uploadcare::Api.new(credentials)
@vipulnsward vipulnsward self-assigned this May 26, 2024
@vipulnsward vipulnsward removed their assignment Jun 12, 2024
@vipulnsward vipulnsward self-assigned this Aug 2, 2024
@fhwang
Copy link

fhwang commented Sep 5, 2024

Any thoughts on when this will be done? My application is also being hit by this issue.

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

5 participants