Skip to content

Commit 88cf587

Browse files
feat: support file encryption
1 parent 3d05517 commit 88cf587

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/CoreApi/FileSystemApi.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ internal FileSystemApi(IpfsClient ipfs)
5959
opts.Add($"hash=${options.Hash}");
6060
if (options.Encoding != MultiBase.DefaultAlgorithmName)
6161
opts.Add($"cid-base=${options.Encoding}");
62+
if (!string.IsNullOrWhiteSpace(options.ProtectionKey))
63+
opts.Add($"protect={options.ProtectionKey}");
6264
opts.Add($"chunker=size-{options.ChunkSize}");
6365

6466
var json = await ipfs.UploadAsync("add", cancel, stream, name, opts.ToArray());

src/IpfsHttpClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</PropertyGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="Ipfs.Core" Version="0.38.1" />
30+
<PackageReference Include="Ipfs.Core" Version="0.39.0" />
3131
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
3232
<PackageReference Include="System.Net.Http" Version="4.3.3" Condition="'$(TargetFramework)' == 'netstandard14'" />
3333
<PackageReference Include="System.Net.Http" Version="4.3.3" Condition="'$(TargetFramework)' == 'net45'" />

0 commit comments

Comments
 (0)