mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Reactivate GoogleCloudStorage
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="'$(SupportGoogleStorage)' == 'false'" />
|
<Compile Remove="Storage\Services\Providers\GoogleCloudStorage\**" />
|
||||||
<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="'$(SupportGoogleStorage)' == 'true'" />
|
<PackageReference Include="TwentyTwenty.Storage.Google" Version="2.11.2" />
|
||||||
<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="'$(SupportGoogleStorage)' == 'true'">
|
<Content Remove="Views\Server\EditGoogleCloudStorageStorageProvider.cshtml">
|
||||||
</Content>
|
</Content>
|
||||||
<Content Update="Views\Wallets\_Nav.cshtml">
|
<Content Update="Views\Wallets\_Nav.cshtml">
|
||||||
<Pack>$(IncludeRazorContentInPack)</Pack>
|
<Pack>$(IncludeRazorContentInPack)</Pack>
|
||||||
|
|||||||
@@ -10,10 +10,8 @@ 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 SUPPORT_GOOGLE_STORAGE
|
|
||||||
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
|
|
||||||
using BTCPayServer.Storage.Services.Providers.Models;
|
using BTCPayServer.Storage.Services.Providers.Models;
|
||||||
using BTCPayServer.Storage.ViewModels;
|
using BTCPayServer.Storage.ViewModels;
|
||||||
using BTCPayServer.Views;
|
using BTCPayServer.Views;
|
||||||
@@ -221,11 +219,9 @@ namespace BTCPayServer.Controllers
|
|||||||
case AmazonS3FileProviderService fileProviderService:
|
case AmazonS3FileProviderService fileProviderService:
|
||||||
return View(nameof(EditAmazonS3StorageProvider),
|
return View(nameof(EditAmazonS3StorageProvider),
|
||||||
fileProviderService.GetProviderConfiguration(data));
|
fileProviderService.GetProviderConfiguration(data));
|
||||||
#if SUPPORT_GOOGLE_STORAGE
|
|
||||||
case GoogleCloudStorageFileProviderService fileProviderService:
|
case GoogleCloudStorageFileProviderService fileProviderService:
|
||||||
return View(nameof(EditGoogleCloudStorageStorageProvider),
|
return View(nameof(EditGoogleCloudStorageStorageProvider),
|
||||||
fileProviderService.GetProviderConfiguration(data));
|
fileProviderService.GetProviderConfiguration(data));
|
||||||
#endif
|
|
||||||
case FileSystemFileProviderService fileProviderService:
|
case FileSystemFileProviderService fileProviderService:
|
||||||
if (data.Provider != BTCPayServer.Storage.Models.StorageProvider.FileSystem)
|
if (data.Provider != BTCPayServer.Storage.Models.StorageProvider.FileSystem)
|
||||||
{
|
{
|
||||||
@@ -252,14 +248,14 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
return await SaveStorageProvider(viewModel, BTCPayServer.Storage.Models.StorageProvider.AmazonS3);
|
return await SaveStorageProvider(viewModel, BTCPayServer.Storage.Models.StorageProvider.AmazonS3);
|
||||||
}
|
}
|
||||||
#if SUPPORT_GOOGLE_STORAGE
|
|
||||||
[HttpPost("server/storage/GoogleCloudStorage")]
|
[HttpPost("server/storage/GoogleCloudStorage")]
|
||||||
public async Task<IActionResult> EditGoogleCloudStorageStorageProvider(
|
public async Task<IActionResult> EditGoogleCloudStorageStorageProvider(
|
||||||
GoogleCloudStorageConfiguration viewModel)
|
GoogleCloudStorageConfiguration viewModel)
|
||||||
{
|
{
|
||||||
return await SaveStorageProvider(viewModel, BTCPayServer.Storage.Models.StorageProvider.GoogleCloudStorage);
|
return await SaveStorageProvider(viewModel, BTCPayServer.Storage.Models.StorageProvider.GoogleCloudStorage);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
[HttpPost("server/storage/FileSystem")]
|
[HttpPost("server/storage/FileSystem")]
|
||||||
public async Task<IActionResult> EditFileSystemStorageProvider(FileSystemStorageConfiguration viewModel)
|
public async Task<IActionResult> EditFileSystemStorageProvider(FileSystemStorageConfiguration viewModel)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,9 +4,5 @@
|
|||||||
<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>true</SupportGoogleStorage>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(SupportGoogleStorage)' == 'true'">
|
|
||||||
<DefineConstants>$(DefineConstants);SUPPORT_GOOGLE_STORAGE</DefineConstants>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user