Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
Receiving HTML File Object in C# API via Post

im trying to Send a File[] to a C# API.

In the same POST request i have other value which get received normaly. Whats the best way to Cast/ Receive an File Object? i could retrieve the .stream() or .arrayBuffer() property, but its a promise and is not fullfilled till im sending the Files.

Is there a C# class / Api i could cast the Files[] in?

This is my API

[Route("CreateJobWithFile")]
[HttpPost]
public Task<ApiResultModel<bool>> CreateJobWithFile(testClass test)
{
    ApiResultModel<bool> result = new ApiResultModel<bool>()
    {
        Data = true
    };
    return Task.FromResult(result);
}

working model

public class testClass
{
    public string Verfahren { get; set; }
    public string Anwendung { get; set; }
    public string Shape{ get; set; }

    public string test4 { get; set; }

    public List<byte[]> Files { get; set; }

    public testClass()
    {
        Files = new List<byte[]>();
    }
}

I tried array of Stream and Byte[] but bot had the Problem that the Promise is not fullfilled

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!