Interface or abstract class and cannot be instantiated


#1

Hello, I am trying to use HangFire in a .Net core application for file uploading.
This is a simple file input form that calls the controller and it’s related action. Below is the code I’m using.

Is this possible what I am trying to achieve here ? Create a queue job for a file upload ?
Right now I’m presented with the interface exception “Type is an interface or abstract class and cannot be instantiated” because of IFormFile interface.

Could you please advise.

Thanks in advance,
Ricardo


Is there an example of Enqueue() to read/load a file using CSVHelper?
#2

Ricardo, did you ever find a solution for this? I am having the same exact problem myself and can’t seem to find an answer on whether you can Enqueue() a task and pass IFormFile into it.

Thanks!
Bryan