Gestiti allegati da galleria e fotocamera e aggiunto sentry
This commit is contained in:
23
SteUp.Shared/Core/Dto/AttachedDto.cs
Normal file
23
SteUp.Shared/Core/Dto/AttachedDto.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace SteUp.Shared.Core.Dto;
|
||||
|
||||
public class AttachedDto
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string? MimeType { get; set; }
|
||||
public long? DimensionBytes { get; set; }
|
||||
public string? Path { get; set; }
|
||||
|
||||
public byte[]? FileBytes { get; set; }
|
||||
|
||||
public Stream? FileContent =>
|
||||
FileBytes is null ? null : new MemoryStream(FileBytes);
|
||||
|
||||
public TypeAttached Type { get; set; }
|
||||
|
||||
public enum TypeAttached
|
||||
{
|
||||
Image
|
||||
}
|
||||
}
|
||||
12
SteUp.Shared/Core/Interface/System/IAttachedService.cs
Normal file
12
SteUp.Shared/Core/Interface/System/IAttachedService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using SteUp.Shared.Core.Dto;
|
||||
|
||||
namespace SteUp.Shared.Core.Interface.System;
|
||||
|
||||
public interface IAttachedService
|
||||
{
|
||||
Task<AttachedDto?> SelectImageFromCamera();
|
||||
Task<AttachedDto?> SelectImageFromGallery();
|
||||
|
||||
Task<string> SaveToTempStorage(Stream file, string fileName, CancellationToken ct = default);
|
||||
Task OpenFile(string fileName, string filePath);
|
||||
}
|
||||
Reference in New Issue
Block a user