mirror of
https://github.com/bitwarden/server.git
synced 2025-07-15 14:47:45 -05:00
Changed all C# control flow block statements to include space between keyword and open paren
This commit is contained in:
@ -10,15 +10,15 @@ namespace Bit.Api.Utilities
|
||||
public async static Task<T> ReadJsonFileFromBody<T>(HttpContext httpContext, IFormFile file, long maxSize = 51200)
|
||||
{
|
||||
T obj = default(T);
|
||||
if(file != null && httpContext.Request.ContentLength.HasValue && httpContext.Request.ContentLength.Value <= maxSize)
|
||||
if (file != null && httpContext.Request.ContentLength.HasValue && httpContext.Request.ContentLength.Value <= maxSize)
|
||||
{
|
||||
try
|
||||
{
|
||||
using(var stream = file.OpenReadStream())
|
||||
using(var reader = new StreamReader(stream))
|
||||
using (var stream = file.OpenReadStream())
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
var s = await reader.ReadToEndAsync();
|
||||
if(!string.IsNullOrWhiteSpace(s))
|
||||
if (!string.IsNullOrWhiteSpace(s))
|
||||
{
|
||||
obj = JsonConvert.DeserializeObject<T>(s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user