Skip to content

Commit 9c269b4

Browse files
Add constructor.
1 parent 9e3a47b commit 9c269b4

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

csharp/Squidex.ClientLibrary/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageTags>Squidex HeadlessCMS</PackageTags>
1616
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1717
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
18-
<Version>12.5.0</Version>
18+
<Version>12.6.0</Version>
1919
</PropertyGroup>
2020

2121
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">

csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Management/AssetsClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public async Task UploadAssetAsync(string app, FileParameter file, AssetUploadOp
125125
var httpClient = _httpClientProvider.Get();
126126
try
127127
{
128-
await httpClient.UploadWithProgressAsync(url, file.ToUploadFile(), options.ToOptions(file, this), cancellationToken);
128+
await httpClient.UploadWithProgressAsync(url, file.ToUploadFile(), options.ToOptions(this), cancellationToken);
129129
}
130130
finally
131131
{

csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Management/FileParameter.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ public partial class FileParameter
2121
/// </summary>
2222
public long? ContentLength { get; set; }
2323

24+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
25+
public FileParameter(Stream data, string fileName, string contentType, int? contentLength)
26+
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
27+
{
28+
Data = data;
29+
FileName = fileName;
30+
ContentType = contentType;
31+
ContentLength = contentLength;
32+
}
33+
2434
/// <summary>
2535
/// Creates a new file parameter from a file info object.
2636
/// </summary>

csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Management/ProgressHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public struct AssetUploadOptions
164164
public IAssetProgressHandler? ProgressHandler { get; set; }
165165

166166
#pragma warning disable MA0102 // Make member readonly
167-
internal UploadOptions ToOptions(FileParameter file, AssetsClient client)
167+
internal UploadOptions ToOptions(AssetsClient client)
168168
#pragma warning restore MA0102 // Make member readonly
169169
{
170170
var result = new UploadOptions

0 commit comments

Comments
 (0)