@@ -13,7 +13,7 @@ namespace Supabase.Storage.Extensions
13
13
/// </summary>
14
14
internal static class HttpClientProgress
15
15
{
16
- public static async Task < MemoryStream > DownloadDataAsync ( this HttpClient client , Uri uri , Dictionary < string , string > headers = null , IProgress < float > progress = null , CancellationToken cancellationToken = default ( CancellationToken ) )
16
+ public static async Task < MemoryStream > DownloadDataAsync ( this HttpClient client , Uri uri , Dictionary < string , string > ? headers = null , IProgress < float > ? progress = null , CancellationToken cancellationToken = default ( CancellationToken ) )
17
17
{
18
18
var destination = new MemoryStream ( ) ;
19
19
var message = new HttpRequestMessage ( HttpMethod . Get , uri ) ;
@@ -48,7 +48,7 @@ internal static class HttpClientProgress
48
48
return destination ;
49
49
}
50
50
51
- static async Task CopyToAsync ( this Stream source , Stream destination , int bufferSize , IProgress < long > progress = null , CancellationToken cancellationToken = default ( CancellationToken ) )
51
+ static async Task CopyToAsync ( this Stream source , Stream destination , int bufferSize , IProgress < long > ? progress = null , CancellationToken cancellationToken = default ( CancellationToken ) )
52
52
{
53
53
if ( bufferSize < 0 )
54
54
throw new ArgumentOutOfRangeException ( nameof ( bufferSize ) ) ;
@@ -72,19 +72,19 @@ internal static class HttpClientProgress
72
72
}
73
73
}
74
74
75
- public static Task < HttpResponseMessage > UploadFileAsync ( this HttpClient client , Uri uri , string filePath , Dictionary < string , string > headers = null , Progress < float > progress = null )
75
+ public static Task < HttpResponseMessage > UploadFileAsync ( this HttpClient client , Uri uri , string filePath , Dictionary < string , string > ? headers = null , Progress < float > ? progress = null )
76
76
{
77
77
var fileStream = new FileStream ( filePath , mode : FileMode . Open , FileAccess . Read ) ;
78
78
return UploadAsync ( client , uri , fileStream , headers , progress ) ;
79
79
}
80
80
81
- public static Task < HttpResponseMessage > UploadBytesAsync ( this HttpClient client , Uri uri , byte [ ] data , Dictionary < string , string > headers = null , Progress < float > progress = null )
81
+ public static Task < HttpResponseMessage > UploadBytesAsync ( this HttpClient client , Uri uri , byte [ ] data , Dictionary < string , string > ? headers = null , Progress < float > ? progress = null )
82
82
{
83
83
var stream = new MemoryStream ( data ) ;
84
84
return UploadAsync ( client , uri , stream , headers , progress ) ;
85
85
}
86
86
87
- public static async Task < HttpResponseMessage > UploadAsync ( this HttpClient client , Uri uri , Stream stream , Dictionary < string , string > headers = null , Progress < float > progress = null )
87
+ public static async Task < HttpResponseMessage > UploadAsync ( this HttpClient client , Uri uri , Stream stream , Dictionary < string , string > ? headers = null , Progress < float > ? progress = null )
88
88
{
89
89
var content = new ProgressableStreamContent ( stream , 4096 , progress ) ;
90
90
0 commit comments