This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Example.Storage | |
{ | |
public class Example | |
{ | |
protected readonly IFileUploadService UploadService; | |
public Example(IFileUploadService uploadService) | |
{ | |
this.UploadService = uploadService; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Example.Storage | |
{ | |
public class ExampleWithoutInterface | |
{ | |
protected readonly IHostEnvironment Env; | |
public ExampleWithoutInterface(IHostEnvironment env) | |
{ | |
this.Env = env; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using System.Threading.Tasks; | |
using Example.Storage.Responses; | |
namespace Example.Storage.Interfaces | |
{ | |
public interface IFileUploadService | |
{ | |
Task<UploadResult> UploadAsync(Stream stream, string filename, string path = null); |