This file contains hidden or 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
[HttpPost] | |
public async Task<IActionResult> Index(IList<IFormFile> files) | |
{ | |
foreach (IFormFile source in files) | |
{ | |
string filename = ContentDispositionHeaderValue.Parse(source.ContentDisposition).FileName.Trim('"'); | |
filename = this.EnsureCorrectFilename(filename); | |
using (FileStream output = System.IO.File.Create(this.GetPathAndFilename(filename))) |
This file contains hidden or 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
function uploadFiles(inputId) { | |
var input = document.getElementById(inputId); | |
var files = input.files; | |
var formData = new FormData(); | |
for (var i = 0; i != files.length; i++) { | |
formData.append("files", files[i]); | |
} | |
startUpdatingProgressIndicator(); |
This file contains hidden or 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
[HttpPost] | |
public async Task<IActionResult> Index(IList<IFormFile> files) | |
{ | |
Startup.Progress = 0; | |
long totalBytes = files.Sum(f => f.Length); | |
foreach (IFormFile source in files) | |
{ | |
string filename = ContentDispositionHeaderValue.Parse(source.ContentDisposition).FileName.Trim('"'); |
This file contains hidden or 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
"dependencies": { | |
"ExtCore.WebApplication": "1.1.0", | |
"Microsoft.AspNetCore.Diagnostics": "1.1.0", | |
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0", | |
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0", | |
"Microsoft.Extensions.Logging.Console": "1.1.0", | |
"Microsoft.NETCore.App": { | |
"type": "platform", | |
"version": "1.1.0" | |
}, |
This file contains hidden or 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
public Startup(IServiceProvider serviceProvider) | |
: base(serviceProvider) | |
{ | |
this.serviceProvider.GetService<ILoggerFactory>().AddConsole(); | |
} |
This file contains hidden or 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
public class Extension : ExtensionBase | |
{ | |
public override string Name | |
{ | |
get | |
{ | |
return "Some useful module"; | |
} | |
} | |
} |
This file contains hidden or 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
"dependencies": { | |
"ExtCore.Infrastructure": "1.1.0" | |
} |
This file contains hidden or 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
public override void Configure(IApplicationBuilder applicationBuilder) | |
{ | |
if (this.serviceProvider.GetService<IHostingEnvironment>().IsDevelopment()) | |
{ | |
applicationBuilder.UseDeveloperExceptionPage(); | |
applicationBuilder.UseBrowserLink(); | |
} | |
base.Configure(applicationBuilder); | |
applicationBuilder.Run(async (context) => |
This file contains hidden or 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
public interface IToolbar | |
{ | |
IEnumerable<Button> Buttons { get; } | |
int Position { get; } | |
} |
This file contains hidden or 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
public class Button | |
{ | |
public string Name { get; } | |
public int Position { get; } | |
public Button(string name, int position) | |
{ | |
this.Name = name; | |
this.Position = position; | |
} |