supabase-community / storage-csharp

A C# implementation of Supabase's Object Storage API
https://supabase-community.github.io/storage-csharp/api/Supabase.Storage.Client.html
MIT License
19 stars 7 forks source link

Make HTTPClient timeout configurable #4

Closed Kuffs2205 closed 1 year ago

Kuffs2205 commented 1 year ago

I'm uploading a 250Mb file but it fails part way with an exception:

The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.

I can see nothing in the documentation on how to configure the timeout for the upload. Ideally, I would like to just upload and it runs to completion or throws an exception. This would be preferable to guessing how long of a timeout I may possibly need.

Thank You

acupofjose commented 1 year ago

Can do!

acupofjose commented 1 year ago

Available on supabase-csharp@0.8.4 and configurable with StorageClientOptions in SupabaseOptions - for uploads and downloads the Timespan defaults to infinity.

Kuffs2205 commented 1 year ago

Thank You. I spotted ClientOptions in the source a couple of days ago and spent ages trying to find where to apply it. Didn't realise at the time that you had just added it 2 hours previously and it wasn't in my version yet. :)