mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Run dotnet format
This commit is contained in:
@@ -28,8 +28,8 @@ namespace BTCPayServer.Storage.Services.Providers.FileSystemStorage
|
||||
{
|
||||
return Path.Combine(options.DataDir, LocalStorageDirectoryName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static string GetTempStorageDir(BTCPayServerOptions options)
|
||||
{
|
||||
return Path.Combine(GetStorageDir(options), "tmp");
|
||||
@@ -48,7 +48,7 @@ namespace BTCPayServer.Storage.Services.Providers.FileSystemStorage
|
||||
public override async Task<string> GetFileUrl(Uri baseUri, StoredFile storedFile, StorageSettings configuration)
|
||||
{
|
||||
var baseResult = await base.GetFileUrl(baseUri, storedFile, configuration);
|
||||
var url = new Uri(baseUri,LocalStorageDirectoryName );
|
||||
var url = new Uri(baseUri, LocalStorageDirectoryName);
|
||||
return baseResult.Replace(new DirectoryInfo(GetStorageDir(_options)).FullName, url.AbsoluteUri,
|
||||
StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
@@ -60,8 +60,8 @@ namespace BTCPayServer.Storage.Services.Providers.FileSystemStorage
|
||||
|
||||
var localFileDescriptor = new TemporaryLocalFileDescriptor()
|
||||
{
|
||||
Expiry = expiry,
|
||||
FileId = storedFile.Id,
|
||||
Expiry = expiry,
|
||||
FileId = storedFile.Id,
|
||||
IsDownload = isDownload
|
||||
};
|
||||
var name = Guid.NewGuid().ToString();
|
||||
@@ -70,10 +70,10 @@ namespace BTCPayServer.Storage.Services.Providers.FileSystemStorage
|
||||
{
|
||||
File.Create(fullPath).Dispose();
|
||||
}
|
||||
|
||||
|
||||
await File.WriteAllTextAsync(Path.Combine(GetTempStorageDir(_options), name), JsonConvert.SerializeObject(localFileDescriptor));
|
||||
|
||||
return new Uri(baseUri,$"{LocalStorageDirectoryName}tmp/{name}{(isDownload ? "?download" : string.Empty)}").AbsoluteUri;
|
||||
|
||||
return new Uri(baseUri, $"{LocalStorageDirectoryName}tmp/{name}{(isDownload ? "?download" : string.Empty)}").AbsoluteUri;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user