Skip to content

Commit 6c044f6

Browse files
Make OwnerSignature, CipherHash and EncryptedProperties base64 strings again
1 parent 15e445c commit 6c044f6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Modules/Files/src/Files.ConsumerApi/Controllers/FilesController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public async Task<IActionResult> UploadFile([FromForm] CreateFileDTO dto, Cancel
4747
{
4848
FileContent = inputStream.ToArray(),
4949
ExpiresAt = dto.ExpiresAt,
50-
CipherHash = dto.CipherHash,
50+
CipherHash = UrlBase64.Decode(dto.CipherHash),
5151
Owner = dto.Owner,
52-
OwnerSignature = dto.OwnerSignature,
53-
EncryptedProperties = dto.EncryptedProperties
52+
OwnerSignature = UrlBase64.Decode(dto.OwnerSignature),
53+
EncryptedProperties = UrlBase64.Decode(dto.EncryptedProperties)
5454
};
5555

5656
var response = await _mediator.Send(command, cancellationToken);

Modules/Files/src/Files.ConsumerApi/DTOs/CreateFileDTO.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ public class CreateFileDTO
77
{
88
public required IFormFile Content { get; set; }
99
public required IdentityAddress Owner { get; set; }
10-
public required byte[] OwnerSignature { get; set; }
10+
public required string OwnerSignature { get; set; }
1111

12-
public required byte[] CipherHash { get; set; }
12+
public required string CipherHash { get; set; }
1313

1414
public required DateTime ExpiresAt { get; set; }
1515

16-
public required byte[] EncryptedProperties { get; set; }
16+
public required string EncryptedProperties { get; set; }
1717
}

0 commit comments

Comments
 (0)