uploadcare-ruby icon indicating copy to clipboard operation
uploadcare-ruby copied to clipboard

Ability to use API client instances instead of globally configured instance

Open alxgsv opened this issue 2 years ago • 1 comments

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)

alxgsv avatar Nov 28 '23 04:11 alxgsv

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

fhwang avatar Sep 05 '24 22:09 fhwang