mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Add google storage at build time
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Build\**" />
|
<Compile Remove="Build\**" />
|
||||||
<Compile Remove="Storage\Services\Providers\GoogleCloudStorage\**" Condition="'$(TargetFramework)' != 'netcoreapp2.1'" />
|
<Compile Remove="Storage\Services\Providers\GoogleCloudStorage\**" Condition="'$(SupportGoogleStorage)' == 'true'" />
|
||||||
<Compile Remove="wwwroot\bundles\jqueryvalidate\**" />
|
<Compile Remove="wwwroot\bundles\jqueryvalidate\**" />
|
||||||
<Compile Remove="wwwroot\vendor\jquery-nice-select\**" />
|
<Compile Remove="wwwroot\vendor\jquery-nice-select\**" />
|
||||||
<Content Remove="Build\**" />
|
<Content Remove="Build\**" />
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<PackageReference Include="TwentyTwenty.Storage" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage" Version="2.11.2" />
|
||||||
<PackageReference Include="TwentyTwenty.Storage.Amazon" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage.Amazon" Version="2.11.2" />
|
||||||
<PackageReference Include="TwentyTwenty.Storage.Azure" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage.Azure" Version="2.11.2" />
|
||||||
<PackageReference Include="TwentyTwenty.Storage.Google" Version="2.11.2" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
|
<PackageReference Include="TwentyTwenty.Storage.Google" Version="2.11.2" Condition="'$(SupportGoogleStorage)' == 'true'" />
|
||||||
<PackageReference Include="TwentyTwenty.Storage.Local" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage.Local" Version="2.11.2" />
|
||||||
<PackageReference Include="U2F.Core" Version="1.0.4" />
|
<PackageReference Include="U2F.Core" Version="1.0.4" />
|
||||||
<PackageReference Include="YamlDotNet" Version="5.2.1" />
|
<PackageReference Include="YamlDotNet" Version="5.2.1" />
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
<Content Update="Views\Wallets\WalletTransactions.cshtml">
|
<Content Update="Views\Wallets\WalletTransactions.cshtml">
|
||||||
<Pack>$(IncludeRazorContentInPack)</Pack>
|
<Pack>$(IncludeRazorContentInPack)</Pack>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Remove="Views\Server\EditGoogleCloudStorageStorageProvider.cshtml" Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
|
<Content Remove="Views\Server\EditGoogleCloudStorageStorageProvider.cshtml" Condition="'$(SupportGoogleStorage)' == 'true'">
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Views\Wallets\_Nav.cshtml">
|
<Content Update="Views\Wallets\_Nav.cshtml">
|
||||||
<Pack>$(IncludeRazorContentInPack)</Pack>
|
<Pack>$(IncludeRazorContentInPack)</Pack>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using BTCPayServer.Storage.Services.Providers.AzureBlobStorage;
|
|||||||
using BTCPayServer.Storage.Services.Providers.AzureBlobStorage.Configuration;
|
using BTCPayServer.Storage.Services.Providers.AzureBlobStorage.Configuration;
|
||||||
using BTCPayServer.Storage.Services.Providers.FileSystemStorage;
|
using BTCPayServer.Storage.Services.Providers.FileSystemStorage;
|
||||||
using BTCPayServer.Storage.Services.Providers.FileSystemStorage.Configuration;
|
using BTCPayServer.Storage.Services.Providers.FileSystemStorage.Configuration;
|
||||||
#if NETCOREAPP21
|
#if SupportGoogleStorage
|
||||||
using BTCPayServer.Storage.Services.Providers.GoogleCloudStorage;
|
using BTCPayServer.Storage.Services.Providers.GoogleCloudStorage;
|
||||||
using BTCPayServer.Storage.Services.Providers.GoogleCloudStorage.Configuration;
|
using BTCPayServer.Storage.Services.Providers.GoogleCloudStorage.Configuration;
|
||||||
#endif
|
#endif
|
||||||
@@ -221,7 +221,7 @@ namespace BTCPayServer.Controllers
|
|||||||
case AmazonS3FileProviderService fileProviderService:
|
case AmazonS3FileProviderService fileProviderService:
|
||||||
return View(nameof(EditAmazonS3StorageProvider),
|
return View(nameof(EditAmazonS3StorageProvider),
|
||||||
fileProviderService.GetProviderConfiguration(data));
|
fileProviderService.GetProviderConfiguration(data));
|
||||||
#if NETCOREAPP21
|
#if SupportGoogleStorage
|
||||||
case GoogleCloudStorageFileProviderService fileProviderService:
|
case GoogleCloudStorageFileProviderService fileProviderService:
|
||||||
return View(nameof(EditGoogleCloudStorageStorageProvider),
|
return View(nameof(EditGoogleCloudStorageStorageProvider),
|
||||||
fileProviderService.GetProviderConfiguration(data));
|
fileProviderService.GetProviderConfiguration(data));
|
||||||
@@ -252,7 +252,7 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
return await SaveStorageProvider(viewModel, BTCPayServer.Storage.Models.StorageProvider.AmazonS3);
|
return await SaveStorageProvider(viewModel, BTCPayServer.Storage.Models.StorageProvider.AmazonS3);
|
||||||
}
|
}
|
||||||
#if NETCOREAPP21
|
#if SupportGoogleStorage
|
||||||
[HttpPost("server/storage/GoogleCloudStorage")]
|
[HttpPost("server/storage/GoogleCloudStorage")]
|
||||||
public async Task<IActionResult> EditGoogleCloudStorageStorageProvider(
|
public async Task<IActionResult> EditGoogleCloudStorageStorageProvider(
|
||||||
GoogleCloudStorageConfiguration viewModel)
|
GoogleCloudStorageConfiguration viewModel)
|
||||||
|
|||||||
@@ -4,5 +4,9 @@
|
|||||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
|
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
|
||||||
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
|
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
|
||||||
<LangVersion>8.0</LangVersion>
|
<LangVersion>8.0</LangVersion>
|
||||||
|
<SupportGoogleStorage>false</SupportGoogleStorage>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(SupportGoogleStorage)' == 'true'">
|
||||||
|
<DefineConstants>$(DefineConstants);SUPPORT_GOOGLE_STORAGE</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user