for (let i = 0; i < files.length; i++) {
formData.append("files", files[i]); // имя должно совпадать в модели, то есть для моего случая первая буква в нижнем регистре остальные в верхнем Files -> files, FirstName -> firstName
}
[HttpGet("file/{sid}/{id}")]
[AllowAnonymous]
public ActionResult GetFile(string id, string sid)
{
var itemId = Guid.Parse(id);
var storageId = Guid.Parse(sid);
var store = _store.GetSingle(x => x.Id == storageId);
var img = _leaf.GetSingle(x => x.Id == itemId);
var path = Utils.GetFolder(_baseFolder, store.UserId, storageId);
var fp = Path.Combine(path, img.Id.ToString("N"));
var b = System.IO.File.ReadAllBytes(fp);
return File(b, "application/octet-stream");
}
private StoresViewModel GetModel(Guid id, Store store)
{
var leafs = _leaf.FindBy(x => x.ParentId == id);
var result = new StoresViewModel
{
Stores = leafs.Select(_mapper.Map<StoreViewModel>).ToList(),
IsStore = store.Id == id,
Breadcrumbs = GenerateBreadcrumbs(store, id)
};
return result;
}
Start regedit.exe (Start - Run - regedit)
Open the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current Version\Winlogon
Double-click the DefaultDomainName and fill in your domain name
Double-click the DefaultUserName and fill in login name
From Edit menu, select New String Value and enter DefaultPassword as name of value
Double-click the DefaultPassword and enter in the password
From Edit menu, select New String Value and enter AutoAdminLogon as name of value
Double-click the AutoAdminLogon and set the value to the number 1
Close regedit
Log off and you will be automatically logged in again
You should also make sure DontDisplayLastUserName (also under the WinLogon key) is set to 0.
public class VersionController : ApiController
{
public Version GetVersion ()
{
var version = new Versions();
return version;
}
}
https://simple.com/?name=222&email=444&message=ghjkghjk&agree=on