Merge remote-tracking branch 'origin/Test_CI' into tests_merging
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
26574cc639
@ -1,16 +0,0 @@
|
|||||||
namespace Dto;
|
|
||||||
|
|
||||||
public class ActivityFitFileDto
|
|
||||||
{
|
|
||||||
public ActivityFitFileDto(string activityName, string activityType, int effortFeel)
|
|
||||||
{
|
|
||||||
ActivityName = activityName;
|
|
||||||
ActivityType = activityType;
|
|
||||||
EffortFeel = effortFeel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ActivityName { get; set; }
|
|
||||||
public string ActivityType { get; set; }
|
|
||||||
public int EffortFeel { get; set; }
|
|
||||||
//public IFormFile
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
namespace Entities;
|
|
||||||
public class PictureEntity
|
|
||||||
{
|
|
||||||
[Key]
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
[Required]
|
|
||||||
public byte[] Bytes { get; set; } = null!;
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
|
||||||
|
|
||||||
namespace HeartTrackAPI;
|
|
||||||
|
|
||||||
public class FileUploadSummary
|
|
||||||
{
|
|
||||||
public int TotalFilesUploaded { get; set; }
|
|
||||||
public string TotalSizeUploaded { get; set; }
|
|
||||||
public IList<string> FilePaths { get; set; } = new List<string>();
|
|
||||||
public IList<string> NotUploadedFiles { get; set; } = new List<string>();
|
|
||||||
}
|
|
||||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
|
|
||||||
public class MultipartFormDataAttribute : ActionFilterAttribute
|
|
||||||
{
|
|
||||||
public override void OnActionExecuting(ActionExecutingContext context)
|
|
||||||
{
|
|
||||||
var request = context.HttpContext.Request;
|
|
||||||
|
|
||||||
if (request.HasFormContentType
|
|
||||||
&& request.ContentType.StartsWith("multipart/form-data", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
context.Result = new StatusCodeResult(StatusCodes.Status415UnsupportedMediaType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
|
||||||
public class DisableFormValueModelBindingAttribute : Attribute, IResourceFilter
|
|
||||||
{
|
|
||||||
public void OnResourceExecuting(ResourceExecutingContext context)
|
|
||||||
{
|
|
||||||
var factories = context.ValueProviderFactories;
|
|
||||||
factories.RemoveType<FormValueProviderFactory>();
|
|
||||||
factories.RemoveType<FormFileValueProviderFactory>();
|
|
||||||
factories.RemoveType<JQueryFormValueProviderFactory>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnResourceExecuted(ResourceExecutedContext context)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue